{
  "openapi": "3.1.0",
  "info": {
    "title": "CertuAI API (REST and MCP)",
    "summary": "Operate a CertuAI account (WhatsApp AI, CRM, calendar, knowledge base, ads, website and more) over REST or MCP.",
    "description": "The CertuAI API operates the account of whoever created the key: WhatsApp conversations, the AI Brain (the knowledge base the AI answers from), products, the AI that answers WhatsApp, CRM, calendar, calls, business records (stock, cash book, orders, payment requests), ads that are always created paused, the website and the Google Business Profile. The same tools serve REST (this document) and the MCP server.\n\n**Start at no cost:** 7 days free, no card. Create the account at https://certuai.com/create-my-agent and see plans at https://certuai.com/pricing.\n\n**Key (self-serve):** in the app, under Settings, Connect to Claude, the owner creates the key (`certu_sk_...`). It is shown once. Send it in the `Authorization: Bearer <key>` header, never in the URL.\n\n**Test key (sandbox):** a `certu_sk_test_...` key reads real data and simulates every write: it validates the parameters and returns `sandbox: true` without saving, spending credits or sending anything. Create it with `POST /api/v1/keys` authenticated by the app login, body `{\"nome\": \"...\", \"teste\": true}`. The same endpoint accepts `escopos` (for example `[\"crm:ler\", \"agenda:escrever\"]`) to restrict the key.\n\n**Limits:** 60 requests per minute per key, 5 active keys and 2,000 calls per day per account. Body up to 1 MB. Every action still follows the account plan and credits.\n\n**MCP:** `POST https://certuai.com/api/v1/mcp` (Streamable HTTP, stateless, JSON only), same Bearer key, or the claude.ai connector with OAuth sign-in. Guide: https://certuai.com/claude\n\n**Another account:** a partner, an owner of more than one business or an admin passes `conta` (query, or in the body of POST requests) to act on that account; the list comes from `GET /parceiro/clientes`.\n\nPaths, parameter names, tool names and enum values are the API contract and stay as they are.\n\n**Responses:** every operation declares its 200 shape in `components.schemas` (`<Tool>Resposta`). With a test key, a tool that writes returns `SimulacaoSandbox` instead.\n\n**Errors:** every REST 4xx and 5xx uses the same shape, the `Erro` schema: `{\"error\": \"<code>\", \"message\": \"<text>\"}`, sometimes with `detalhes` (a list of strings), plus the HTTP status. Rely on `error`, which is stable; `message` is for people. On MCP, protocol errors come back as JSON-RPC 2.0 (`error.code`) and tool errors come back as a result with `isError: true`.\n\n**Rate limit:** every response carries `RateLimit-Policy` (`\"minuto\";q=<limit>;w=60`, IETF draft-ietf-httpapi-ratelimit-headers); once the key has been counted, also `RateLimit` (`\"minuto\";r=<remaining>;t=<seconds>`), `X-RateLimit-Limit` and `X-RateLimit-Remaining`. A 429 carries `Retry-After`.\n\n**Versioning and deprecation:** v1 changes are additive only (new fields, new endpoints, new optional parameters). Anything breaking ships under a new version path (`/api/v2`). Before removing or changing anything in v1, CertuAI notifies key owners by email and sends the `Deprecation` (RFC 9745) and `Sunset` (RFC 8594) response headers, with the date, on the affected endpoints. Deprecated operations are marked `deprecated: true` in this spec. Details: https://certuai.com/docs#versioning\n\nDocs: https://certuai.com/docs",
    "version": "1.0.0",
    "contact": {
      "url": "https://certuai.com/docs"
    }
  },
  "externalDocs": {
    "description": "CertuAI API and MCP documentation",
    "url": "https://certuai.com/docs"
  },
  "servers": [
    {
      "url": "https://certuai.com/api/v1"
    }
  ],
  "security": [
    {
      "chave": []
    }
  ],
  "tags": [
    {
      "name": "account"
    },
    {
      "name": "conversations"
    },
    {
      "name": "knowledge-base"
    },
    {
      "name": "whatsapp-agent"
    },
    {
      "name": "ads"
    },
    {
      "name": "website"
    },
    {
      "name": "google-business-profile"
    },
    {
      "name": "partners"
    },
    {
      "name": "crm"
    },
    {
      "name": "calls"
    },
    {
      "name": "business-records"
    },
    {
      "name": "calendar"
    },
    {
      "name": "payment-requests"
    },
    {
      "name": "pets"
    },
    {
      "name": "real-estate"
    },
    {
      "name": "invoices"
    },
    {
      "name": "clinic"
    },
    {
      "name": "mcp",
      "description": "MCP server"
    }
  ],
  "paths": {
    "/conta": {
      "get": {
        "operationId": "conta_resumo",
        "summary": "Account summary",
        "description": "Shows the CertuAI account's plan, the credits left this month and what the plan includes (paid ads manager, website publishing, Instagram and Messenger, ERP), plus what it does not include.",
        "tags": [
          "account"
        ],
        "parameters": [
          {
            "name": "conta",
            "in": "query",
            "required": false,
            "description": "The account to act on, when it is not yours (partner client, another business of the same owner, admin). Empty = your own.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,64}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tool result, as JSON. With a test key, a tool that writes returns the simulation (`sandbox: true`, `simulado: true`) and nothing is saved.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "Certu-Modo": {
                "$ref": "#/components/headers/CertuModo"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContaResumoResposta"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Erro400"
          },
          "401": {
            "$ref": "#/components/responses/Erro401"
          },
          "402": {
            "$ref": "#/components/responses/Erro402"
          },
          "403": {
            "$ref": "#/components/responses/Erro403"
          },
          "404": {
            "$ref": "#/components/responses/Erro404"
          },
          "429": {
            "$ref": "#/components/responses/Erro429"
          },
          "500": {
            "$ref": "#/components/responses/Erro500"
          },
          "503": {
            "$ref": "#/components/responses/Erro503"
          },
          "default": {
            "$ref": "#/components/responses/ErroPadrao"
          }
        },
        "x-mcp-tool": "conta_resumo",
        "x-scope": "conta:ler",
        "x-read-only": true
      }
    },
    "/conversas": {
      "get": {
        "operationId": "conversas_listar",
        "summary": "List conversations",
        "description": "Lists the most recent conversations (WhatsApp and other channels), newest first, with each one's last message. Filters apply only to the account's recent conversations, not the full history. Read-only: sends no messages.",
        "tags": [
          "conversations"
        ],
        "parameters": [
          {
            "name": "limite",
            "in": "query",
            "required": false,
            "description": "How many conversations to return. Default 20.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "canal",
            "in": "query",
            "required": false,
            "description": "Only conversations from this channel.",
            "schema": {
              "type": "string",
              "enum": [
                "whatsapp",
                "instagram",
                "facebook",
                "site",
                "email",
                "youtube",
                "linkedin",
                "custom"
              ]
            }
          },
          {
            "name": "nao_lidas",
            "in": "query",
            "required": false,
            "description": "Only conversations with a new message nobody has opened.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "conta",
            "in": "query",
            "required": false,
            "description": "The account to act on, when it is not yours (partner client, another business of the same owner, admin). Empty = your own.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,64}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tool result, as JSON. With a test key, a tool that writes returns the simulation (`sandbox: true`, `simulado: true`) and nothing is saved.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "Certu-Modo": {
                "$ref": "#/components/headers/CertuModo"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConversasListarResposta"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Erro400"
          },
          "401": {
            "$ref": "#/components/responses/Erro401"
          },
          "402": {
            "$ref": "#/components/responses/Erro402"
          },
          "403": {
            "$ref": "#/components/responses/Erro403"
          },
          "404": {
            "$ref": "#/components/responses/Erro404"
          },
          "429": {
            "$ref": "#/components/responses/Erro429"
          },
          "500": {
            "$ref": "#/components/responses/Erro500"
          },
          "502": {
            "$ref": "#/components/responses/Erro502"
          },
          "503": {
            "$ref": "#/components/responses/Erro503"
          },
          "default": {
            "$ref": "#/components/responses/ErroPadrao"
          }
        },
        "x-mcp-tool": "conversas_listar",
        "x-scope": "conversas:ler",
        "x-read-only": true
      }
    },
    "/conversas/{contato}": {
      "get": {
        "operationId": "conversa_ler",
        "summary": "Read a conversation",
        "description": "Reads the history of one conversation, oldest first: what the customer wrote and what the business replied. `contato` is the same value shown in the conversation list. Read-only.",
        "tags": [
          "conversations"
        ],
        "parameters": [
          {
            "name": "contato",
            "in": "path",
            "required": true,
            "description": "The `contato` returned by conversas_listar.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          },
          {
            "name": "canal",
            "in": "query",
            "required": false,
            "description": "The conversation channel, when the same contact shows up in more than one.",
            "schema": {
              "type": "string",
              "enum": [
                "whatsapp",
                "instagram",
                "facebook",
                "site",
                "email",
                "youtube",
                "linkedin",
                "custom"
              ]
            }
          },
          {
            "name": "limite",
            "in": "query",
            "required": false,
            "description": "How many messages from the end of the conversation. Default 100.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 600
            }
          },
          {
            "name": "conta",
            "in": "query",
            "required": false,
            "description": "The account to act on, when it is not yours (partner client, another business of the same owner, admin). Empty = your own.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,64}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tool result, as JSON. With a test key, a tool that writes returns the simulation (`sandbox: true`, `simulado: true`) and nothing is saved.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "Certu-Modo": {
                "$ref": "#/components/headers/CertuModo"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConversaLerResposta"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Erro400"
          },
          "401": {
            "$ref": "#/components/responses/Erro401"
          },
          "402": {
            "$ref": "#/components/responses/Erro402"
          },
          "403": {
            "$ref": "#/components/responses/Erro403"
          },
          "404": {
            "$ref": "#/components/responses/Erro404"
          },
          "429": {
            "$ref": "#/components/responses/Erro429"
          },
          "500": {
            "$ref": "#/components/responses/Erro500"
          },
          "502": {
            "$ref": "#/components/responses/Erro502"
          },
          "503": {
            "$ref": "#/components/responses/Erro503"
          },
          "default": {
            "$ref": "#/components/responses/ErroPadrao"
          }
        },
        "x-mcp-tool": "conversa_ler",
        "x-scope": "conversas:ler",
        "x-read-only": true
      }
    },
    "/cerebro": {
      "get": {
        "operationId": "cerebro_listar",
        "summary": "List knowledge base entries",
        "description": "Lists the entries of the Cérebro, the knowledge base the AI uses to answer customers the way the business would. Supports a keyword search and a category filter.",
        "tags": [
          "knowledge-base"
        ],
        "parameters": [
          {
            "name": "busca",
            "in": "query",
            "required": false,
            "description": "Word or phrase to look for in the title or the content.",
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "name": "categoria",
            "in": "query",
            "required": false,
            "description": "Only entries in this category.",
            "schema": {
              "type": "string",
              "maxLength": 60
            }
          },
          {
            "name": "limite",
            "in": "query",
            "required": false,
            "description": "How many entries to return. Default 100.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500
            }
          },
          {
            "name": "conta",
            "in": "query",
            "required": false,
            "description": "The account to act on, when it is not yours (partner client, another business of the same owner, admin). Empty = your own.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,64}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tool result, as JSON. With a test key, a tool that writes returns the simulation (`sandbox: true`, `simulado: true`) and nothing is saved.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "Certu-Modo": {
                "$ref": "#/components/headers/CertuModo"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CerebroListarResposta"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Erro400"
          },
          "401": {
            "$ref": "#/components/responses/Erro401"
          },
          "402": {
            "$ref": "#/components/responses/Erro402"
          },
          "403": {
            "$ref": "#/components/responses/Erro403"
          },
          "404": {
            "$ref": "#/components/responses/Erro404"
          },
          "429": {
            "$ref": "#/components/responses/Erro429"
          },
          "500": {
            "$ref": "#/components/responses/Erro500"
          },
          "502": {
            "$ref": "#/components/responses/Erro502"
          },
          "503": {
            "$ref": "#/components/responses/Erro503"
          },
          "default": {
            "$ref": "#/components/responses/ErroPadrao"
          }
        },
        "x-mcp-tool": "cerebro_listar",
        "x-scope": "cerebro:ler",
        "x-read-only": true
      },
      "post": {
        "operationId": "cerebro_salvar",
        "summary": "Save a knowledge base entry",
        "description": "Creates a knowledge base entry, or updates an existing one when `id` is sent. The AI uses the entry in its next replies.",
        "tags": [
          "knowledge-base"
        ],
        "parameters": [
          {
            "name": "conta",
            "in": "query",
            "required": false,
            "description": "The account to act on, when it is not yours (partner client, another business of the same owner, admin). Empty = your own.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,64}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tool result, as JSON. With a test key, a tool that writes returns the simulation (`sandbox: true`, `simulado: true`) and nothing is saved.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "Certu-Modo": {
                "$ref": "#/components/headers/CertuModo"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CerebroSalvarResposta"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Erro400"
          },
          "401": {
            "$ref": "#/components/responses/Erro401"
          },
          "402": {
            "$ref": "#/components/responses/Erro402"
          },
          "403": {
            "$ref": "#/components/responses/Erro403"
          },
          "404": {
            "$ref": "#/components/responses/Erro404"
          },
          "409": {
            "$ref": "#/components/responses/Erro409"
          },
          "413": {
            "$ref": "#/components/responses/Erro413"
          },
          "423": {
            "$ref": "#/components/responses/Erro423"
          },
          "429": {
            "$ref": "#/components/responses/Erro429"
          },
          "500": {
            "$ref": "#/components/responses/Erro500"
          },
          "502": {
            "$ref": "#/components/responses/Erro502"
          },
          "503": {
            "$ref": "#/components/responses/Erro503"
          },
          "default": {
            "$ref": "#/components/responses/ErroPadrao"
          }
        },
        "x-mcp-tool": "cerebro_salvar",
        "x-scope": "cerebro:escrever",
        "x-read-only": false,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "titulo",
                  "conteudo"
                ],
                "properties": {
                  "titulo": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 160,
                    "description": "Topic of the entry, phrased the way a customer would ask."
                  },
                  "conteudo": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 8000,
                    "description": "The right answer, with the business's facts."
                  },
                  "categoria": {
                    "type": "string",
                    "maxLength": 60,
                    "description": "Free-form category, for example Prices or Delivery."
                  },
                  "id": {
                    "type": "string",
                    "pattern": "^[A-Za-z0-9_-]{1,64}$",
                    "description": "Id of an existing entry, to update it."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/cerebro/apagar": {
      "post": {
        "operationId": "cerebro_apagar",
        "summary": "Delete knowledge base entries",
        "description": "Deletes knowledge base entries by id. Only runs with `confirmado_pelo_dono: true`, which states that the owner saw the list and approved it. Deleted entries stop being used by the AI immediately and are recorded in the account audit log.",
        "tags": [
          "knowledge-base"
        ],
        "parameters": [
          {
            "name": "conta",
            "in": "query",
            "required": false,
            "description": "The account to act on, when it is not yours (partner client, another business of the same owner, admin). Empty = your own.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,64}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tool result, as JSON. With a test key, a tool that writes returns the simulation (`sandbox: true`, `simulado: true`) and nothing is saved.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "Certu-Modo": {
                "$ref": "#/components/headers/CertuModo"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CerebroApagarResposta"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Erro400"
          },
          "401": {
            "$ref": "#/components/responses/Erro401"
          },
          "402": {
            "$ref": "#/components/responses/Erro402"
          },
          "403": {
            "$ref": "#/components/responses/Erro403"
          },
          "404": {
            "$ref": "#/components/responses/Erro404"
          },
          "409": {
            "$ref": "#/components/responses/Erro409"
          },
          "413": {
            "$ref": "#/components/responses/Erro413"
          },
          "423": {
            "$ref": "#/components/responses/Erro423"
          },
          "429": {
            "$ref": "#/components/responses/Erro429"
          },
          "500": {
            "$ref": "#/components/responses/Erro500"
          },
          "502": {
            "$ref": "#/components/responses/Erro502"
          },
          "503": {
            "$ref": "#/components/responses/Erro503"
          },
          "default": {
            "$ref": "#/components/responses/ErroPadrao"
          }
        },
        "x-mcp-tool": "cerebro_apagar",
        "x-scope": "cerebro:escrever",
        "x-read-only": false,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "ids",
                  "confirmado_pelo_dono"
                ],
                "properties": {
                  "ids": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 50,
                    "items": {
                      "type": "string",
                      "pattern": "^[A-Za-z0-9_-]{1,64}$"
                    },
                    "description": "Ids of the entries to delete."
                  },
                  "confirmado_pelo_dono": {
                    "type": "boolean",
                    "description": "true only after the owner has seen the list and said yes in this conversation."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/produtos": {
      "get": {
        "operationId": "produtos_listar",
        "summary": "List products and services",
        "description": "Lists the registered products and services, with price and availability. This is where the AI gets its prices.",
        "tags": [
          "knowledge-base"
        ],
        "parameters": [
          {
            "name": "busca",
            "in": "query",
            "required": false,
            "description": "Word in the name or the description.",
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "name": "conta",
            "in": "query",
            "required": false,
            "description": "The account to act on, when it is not yours (partner client, another business of the same owner, admin). Empty = your own.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,64}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tool result, as JSON. With a test key, a tool that writes returns the simulation (`sandbox: true`, `simulado: true`) and nothing is saved.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "Certu-Modo": {
                "$ref": "#/components/headers/CertuModo"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProdutosListarResposta"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Erro400"
          },
          "401": {
            "$ref": "#/components/responses/Erro401"
          },
          "402": {
            "$ref": "#/components/responses/Erro402"
          },
          "403": {
            "$ref": "#/components/responses/Erro403"
          },
          "404": {
            "$ref": "#/components/responses/Erro404"
          },
          "429": {
            "$ref": "#/components/responses/Erro429"
          },
          "500": {
            "$ref": "#/components/responses/Erro500"
          },
          "502": {
            "$ref": "#/components/responses/Erro502"
          },
          "503": {
            "$ref": "#/components/responses/Erro503"
          },
          "default": {
            "$ref": "#/components/responses/ErroPadrao"
          }
        },
        "x-mcp-tool": "produtos_listar",
        "x-scope": "cerebro:ler",
        "x-read-only": true
      },
      "post": {
        "operationId": "produto_salvar",
        "summary": "Save a product or service",
        "description": "Creates a product or service, or updates an existing one by `id`. On update only the fields sent change; the rest (code, stock, cost, tax data) stays as it is.",
        "tags": [
          "knowledge-base"
        ],
        "parameters": [
          {
            "name": "conta",
            "in": "query",
            "required": false,
            "description": "The account to act on, when it is not yours (partner client, another business of the same owner, admin). Empty = your own.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,64}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tool result, as JSON. With a test key, a tool that writes returns the simulation (`sandbox: true`, `simulado: true`) and nothing is saved.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "Certu-Modo": {
                "$ref": "#/components/headers/CertuModo"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProdutoSalvarResposta"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Erro400"
          },
          "401": {
            "$ref": "#/components/responses/Erro401"
          },
          "402": {
            "$ref": "#/components/responses/Erro402"
          },
          "403": {
            "$ref": "#/components/responses/Erro403"
          },
          "404": {
            "$ref": "#/components/responses/Erro404"
          },
          "409": {
            "$ref": "#/components/responses/Erro409"
          },
          "413": {
            "$ref": "#/components/responses/Erro413"
          },
          "429": {
            "$ref": "#/components/responses/Erro429"
          },
          "500": {
            "$ref": "#/components/responses/Erro500"
          },
          "502": {
            "$ref": "#/components/responses/Erro502"
          },
          "503": {
            "$ref": "#/components/responses/Erro503"
          },
          "default": {
            "$ref": "#/components/responses/ErroPadrao"
          }
        },
        "x-mcp-tool": "produto_salvar",
        "x-scope": "cerebro:escrever",
        "x-read-only": false,
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "id": {
                    "type": "string",
                    "pattern": "^[A-Za-z0-9_-]{1,64}$",
                    "description": "Id of an existing product, to update it."
                  },
                  "nome": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120,
                    "description": "Name of the product or service. Required to create one."
                  },
                  "preco": {
                    "type": "string",
                    "maxLength": 60,
                    "description": "Price the way the customer should hear it, for example \"$89.90\" or \"from $150\"."
                  },
                  "descricao": {
                    "type": "string",
                    "maxLength": 2000,
                    "description": "Short description."
                  },
                  "disponivel": {
                    "type": "boolean",
                    "description": "false when it is out of stock or no longer sold."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/agente": {
      "get": {
        "operationId": "agente_ler",
        "summary": "View the AI settings",
        "description": "Shows the state of the AI that answers on WhatsApp: on or off, paused, draft mode, business hours, owner alerts, blocked contacts and the rest of its settings.",
        "tags": [
          "whatsapp-agent"
        ],
        "parameters": [
          {
            "name": "conta",
            "in": "query",
            "required": false,
            "description": "The account to act on, when it is not yours (partner client, another business of the same owner, admin). Empty = your own.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,64}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tool result, as JSON. With a test key, a tool that writes returns the simulation (`sandbox: true`, `simulado: true`) and nothing is saved.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "Certu-Modo": {
                "$ref": "#/components/headers/CertuModo"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgenteLerResposta"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Erro400"
          },
          "401": {
            "$ref": "#/components/responses/Erro401"
          },
          "402": {
            "$ref": "#/components/responses/Erro402"
          },
          "403": {
            "$ref": "#/components/responses/Erro403"
          },
          "404": {
            "$ref": "#/components/responses/Erro404"
          },
          "429": {
            "$ref": "#/components/responses/Erro429"
          },
          "500": {
            "$ref": "#/components/responses/Erro500"
          },
          "502": {
            "$ref": "#/components/responses/Erro502"
          },
          "503": {
            "$ref": "#/components/responses/Erro503"
          },
          "default": {
            "$ref": "#/components/responses/ErroPadrao"
          }
        },
        "x-mcp-tool": "agente_ler",
        "x-scope": "agente:ler",
        "x-read-only": true
      },
      "patch": {
        "operationId": "agente_ajustar",
        "summary": "Adjust the AI",
        "description": "Changes the switches of the AI: on or off, pause, draft mode, booking on its own, business hours, alerts and blocked contacts. Only these fields are accepted. Turning it off or pausing it makes the AI stop replying to customers.",
        "tags": [
          "whatsapp-agent"
        ],
        "parameters": [
          {
            "name": "conta",
            "in": "query",
            "required": false,
            "description": "The account to act on, when it is not yours (partner client, another business of the same owner, admin). Empty = your own.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,64}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tool result, as JSON. With a test key, a tool that writes returns the simulation (`sandbox: true`, `simulado: true`) and nothing is saved.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "Certu-Modo": {
                "$ref": "#/components/headers/CertuModo"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgenteAjustarResposta"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Erro400"
          },
          "401": {
            "$ref": "#/components/responses/Erro401"
          },
          "402": {
            "$ref": "#/components/responses/Erro402"
          },
          "403": {
            "$ref": "#/components/responses/Erro403"
          },
          "404": {
            "$ref": "#/components/responses/Erro404"
          },
          "409": {
            "$ref": "#/components/responses/Erro409"
          },
          "413": {
            "$ref": "#/components/responses/Erro413"
          },
          "429": {
            "$ref": "#/components/responses/Erro429"
          },
          "500": {
            "$ref": "#/components/responses/Erro500"
          },
          "502": {
            "$ref": "#/components/responses/Erro502"
          },
          "503": {
            "$ref": "#/components/responses/Erro503"
          },
          "default": {
            "$ref": "#/components/responses/ErroPadrao"
          }
        },
        "x-mcp-tool": "agente_ajustar",
        "x-scope": "agente:escrever",
        "x-read-only": false,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "ajustes"
                ],
                "properties": {
                  "ajustes": {
                    "type": "object",
                    "additionalProperties": false,
                    "minProperties": 1,
                    "properties": {
                      "botEnabled": {
                        "type": "boolean",
                        "description": "AI on (true) or off (false). When off, it answers nobody."
                      },
                      "pausedUntil": {
                        "type": "integer",
                        "minimum": 0,
                        "description": "Pauses the AI until this moment, in milliseconds since 1970 (UTC). 0 removes the pause."
                      },
                      "draftMode": {
                        "type": "boolean",
                        "description": "Draft mode: the AI writes the reply and waits for the owner to approve it in the app."
                      },
                      "autoBook": {
                        "type": "boolean",
                        "description": "The AI books appointments on its own over WhatsApp."
                      },
                      "mostrarDigitando": {
                        "type": "boolean",
                        "description": "Shows \"typing…\" to the customer on WhatsApp while the AI writes. Off by default."
                      },
                      "baloes": {
                        "type": "boolean",
                        "description": "The AI replies in up to 3 separate message bubbles, the way the owner writes. Off by default."
                      },
                      "assinarMensagens": {
                        "type": "boolean",
                        "description": "A reply sent by a person from the inbox reaches the customer with the name of whoever wrote it on top."
                      },
                      "businessHours": {
                        "type": "object",
                        "description": "Business hours. Only the fields sent change; the rest stays as it is.",
                        "properties": {
                          "enabled": {
                            "type": "boolean",
                            "description": "Follow the hours (true) or answer at any time (false)."
                          },
                          "days": {
                            "type": "array",
                            "maxItems": 7,
                            "items": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 6
                            },
                            "description": "Open days. 0 is Sunday, 6 is Saturday."
                          },
                          "open": {
                            "type": "string",
                            "pattern": "^\\d{2}:\\d{2}$",
                            "description": "Opening time, in HH:MM format."
                          },
                          "close": {
                            "type": "string",
                            "pattern": "^\\d{2}:\\d{2}$",
                            "description": "Closing time, in HH:MM format."
                          },
                          "message": {
                            "type": "string",
                            "maxLength": 1000,
                            "description": "What the AI says outside business hours."
                          },
                          "mode": {
                            "type": "string",
                            "enum": [
                              "inside",
                              "outside"
                            ],
                            "description": "inside: answers during the hours. outside: answers only outside them."
                          },
                          "silent": {
                            "type": "boolean",
                            "description": "During the window when it does not answer, it sends no message at all."
                          },
                          "triage": {
                            "type": "boolean",
                            "description": "Outside business hours, it does the full triage and says someone will get back later."
                          },
                          "perDay": {
                            "type": "object",
                            "description": "Different hours per day: {\"6\": {\"open\": \"09:00\", \"close\": \"13:00\"}}."
                          }
                        }
                      },
                      "notifyChannels": {
                        "type": "string",
                        "enum": [
                          "both",
                          "whatsapp",
                          "email"
                        ],
                        "description": "Where the owner gets alerts: both (WhatsApp and email), whatsapp or email."
                      },
                      "notifyEmails": {
                        "type": "array",
                        "maxItems": 10,
                        "items": {
                          "type": "string",
                          "maxLength": 200
                        },
                        "description": "Emails that get the alerts. The list sent replaces the current one."
                      },
                      "ownerPhone": {
                        "type": "string",
                        "maxLength": 20,
                        "description": "Owner's phone for alerts, with country and area code, digits only."
                      },
                      "notifyPhones": {
                        "type": "array",
                        "maxItems": 4,
                        "items": {
                          "type": "string",
                          "maxLength": 20
                        },
                        "description": "Other WhatsApp numbers that get the same alerts, besides the owner's phone. With country and area code. The list sent replaces the current one."
                      },
                      "plantaoPhone": {
                        "type": "string",
                        "maxLength": 20,
                        "description": "WhatsApp of whoever is on call: gets every emergency, on top of the other destinations. With country and area code. Empty removes it."
                      },
                      "blockedContacts": {
                        "type": "array",
                        "maxItems": 1000,
                        "items": {
                          "type": "string",
                          "maxLength": 40
                        },
                        "description": "Phone numbers the AI does not answer. The list sent replaces the whole current one: read it first with agente_ler."
                      },
                      "onlyAnswerContacts": {
                        "type": "array",
                        "maxItems": 2000,
                        "items": {
                          "type": "string",
                          "maxLength": 40
                        },
                        "description": "If it has numbers, the AI answers ONLY these phones and stays silent with everyone else. Empty = answers everyone. The list sent replaces the whole current one: read it first with agente_ler."
                      },
                      "onlyAnswerAlsoAds": {
                        "type": "boolean",
                        "description": "With onlyAnswerContacts filled in: true = the AI also answers people who came from an ad, even if they are not on the list. Without a list, it changes nothing."
                      },
                      "onlyAnswerAlsoNew": {
                        "type": "boolean",
                        "description": "With onlyAnswerContacts filled in: true = the AI also answers NEW contacts (people writing for the first time, with no earlier conversation with the number), even if they are not on the list. Without a list, it changes nothing."
                      },
                      "alerts": {
                        "type": "object",
                        "description": "How each alert is delivered, in the same format the AI settings show the alerts."
                      },
                      "dailyDigest": {
                        "type": "boolean",
                        "description": "Daily summary in the morning."
                      },
                      "dailyDigestAsked": {
                        "type": "boolean",
                        "description": "Marks that the owner has already answered whether they want the morning summary."
                      },
                      "eveningDigest": {
                        "type": "boolean",
                        "description": "Summary at the end of the day."
                      },
                      "eveningDigestHour": {
                        "type": "integer",
                        "minimum": 12,
                        "maximum": 23,
                        "description": "Hour of the end-of-day summary (12 to 23)."
                      },
                      "eveningDigestChannel": {
                        "type": "string",
                        "enum": [
                          "both",
                          "whatsapp",
                          "email"
                        ],
                        "description": "How the end-of-day summary is delivered."
                      },
                      "eveningDigestPhone": {
                        "type": "string",
                        "maxLength": 20,
                        "description": "Phone that gets the end-of-day summary."
                      },
                      "timezone": {
                        "type": "string",
                        "maxLength": 60,
                        "description": "Time zone, for example America/New_York."
                      },
                      "reminderOffsetsMin": {
                        "type": "array",
                        "items": {
                          "type": "integer",
                          "minimum": 15,
                          "maximum": 10080
                        },
                        "maxItems": 3,
                        "description": "How many minutes before the appointment each reminder goes out (15 to 10080, up to 3). Default [1440, 60]. It goes out around that time, not at the exact minute."
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/agente/criar": {
      "post": {
        "operationId": "agente_criar",
        "summary": "Build the WhatsApp AI",
        "description": "Builds the AI that answers the business's WhatsApp, the same way the CertuAI setup does: rules, greeting, AI name, business type and the knowledge base (entries and products). Takes the AI name, business name, business type, what it should do (answer, book, sell, follow up) and, if there is one, the website or Instagram handle. With a website, entries and products come from it. Without one, they come from `fichas` and `produtos` (prices, hours, address, payment options, common questions); business types with a ready template get starter entries marked [PREENCHER]. An account that already has an AI is refused unless `substituir: true`, which replaces the persona (rules, greeting, name) and the \"about the business\" entry and keeps hours, alerts and the rest of the knowledge base. It does NOT connect the phone number or charge anything: the result carries the link to scan the QR code and says whether a plan still needs to be chosen.",
        "tags": [
          "whatsapp-agent"
        ],
        "parameters": [
          {
            "name": "conta",
            "in": "query",
            "required": false,
            "description": "The account to act on, when it is not yours (partner client, another business of the same owner, admin). Empty = your own.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,64}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tool result, as JSON. With a test key, a tool that writes returns the simulation (`sandbox: true`, `simulado: true`) and nothing is saved.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "Certu-Modo": {
                "$ref": "#/components/headers/CertuModo"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgenteCriarResposta"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Erro400"
          },
          "401": {
            "$ref": "#/components/responses/Erro401"
          },
          "402": {
            "$ref": "#/components/responses/Erro402"
          },
          "403": {
            "$ref": "#/components/responses/Erro403"
          },
          "404": {
            "$ref": "#/components/responses/Erro404"
          },
          "409": {
            "$ref": "#/components/responses/Erro409"
          },
          "413": {
            "$ref": "#/components/responses/Erro413"
          },
          "429": {
            "$ref": "#/components/responses/Erro429"
          },
          "500": {
            "$ref": "#/components/responses/Erro500"
          },
          "502": {
            "$ref": "#/components/responses/Erro502"
          },
          "503": {
            "$ref": "#/components/responses/Erro503"
          },
          "default": {
            "$ref": "#/components/responses/ErroPadrao"
          }
        },
        "x-mcp-tool": "agente_criar",
        "x-scope": "agente:escrever",
        "x-read-only": false,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "nome_ia",
                  "trabalhos"
                ],
                "properties": {
                  "nome_ia": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 30,
                    "description": "What the AI is called, for example \"Sofia\"."
                  },
                  "nome_negocio": {
                    "type": "string",
                    "maxLength": 60,
                    "description": "Business name. Empty when it has no name yet."
                  },
                  "ramo": {
                    "type": "string",
                    "maxLength": 80,
                    "description": "The type of business in the owner's words, for example \"dental clinic\" or \"car wash\"."
                  },
                  "segmento": {
                    "type": "string",
                    "enum": [
                      "imobiliaria",
                      "clinica",
                      "salao",
                      "restaurante",
                      "oficina",
                      "academia",
                      "servicos",
                      "distribuidora",
                      "mentoria",
                      "advocacia"
                    ],
                    "description": "The type of business from the fixed list, when one fits. It picks the CRM pipeline and the starter entries. When in doubt, leave it out."
                  },
                  "trabalhos": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 4,
                    "items": {
                      "type": "string",
                      "enum": [
                        "atendimento",
                        "agendamento",
                        "followup",
                        "vendas"
                      ]
                    },
                    "description": "What the AI does: atendimento (answers customers), agendamento (books appointments on its own), vendas (sells), followup (gets back in touch with people who went quiet)."
                  },
                  "descricao": {
                    "type": "string",
                    "maxLength": 400,
                    "description": "What the business does and what the owner wants the AI to handle, in their own words."
                  },
                  "site": {
                    "type": "string",
                    "maxLength": 300,
                    "description": "The business's website or Instagram @handle. Optional."
                  },
                  "fichas": {
                    "type": "array",
                    "maxItems": 40,
                    "items": {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "titulo",
                        "conteudo"
                      ],
                      "properties": {
                        "titulo": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 160,
                          "description": "Topic of the entry, phrased the way a customer would ask."
                        },
                        "conteudo": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 8000,
                          "description": "The right answer, with the facts the owner gave."
                        },
                        "categoria": {
                          "type": "string",
                          "maxLength": 60
                        }
                      }
                    },
                    "description": "Knowledge base entries written from what the owner told you."
                  },
                  "produtos": {
                    "type": "array",
                    "maxItems": 60,
                    "items": {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "nome"
                      ],
                      "properties": {
                        "nome": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 120
                        },
                        "preco": {
                          "type": "string",
                          "maxLength": 60,
                          "description": "The way the customer should hear it, for example \"$89.90\" or \"from $150\"."
                        },
                        "descricao": {
                          "type": "string",
                          "maxLength": 2000
                        }
                      }
                    },
                    "description": "Products or services with prices, from what the owner told you."
                  },
                  "lingua": {
                    "type": "string",
                    "enum": [
                      "pt",
                      "en"
                    ],
                    "description": "Language the AI uses to answer customers. \"en\" for a business whose customers speak English; \"pt\" for a business in Brazil. Without this field, it uses English."
                  },
                  "substituir": {
                    "type": "boolean",
                    "description": "true replaces an AI that already exists. Only with the owner's agreement."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/agente/testar": {
      "post": {
        "operationId": "agente_testar",
        "summary": "Test the WhatsApp AI",
        "description": "Chats with the business's AI as if it were a customer on WhatsApp and returns its reply. It is the same rehearsal as the app: same prompt, same knowledge base, same products. Nothing is sent to anyone, nothing is booked, nobody is notified. `conversa` carries the whole conversation so far (the last turn is the customer's). `semResposta: true` means the AI did not know the answer.",
        "tags": [
          "whatsapp-agent"
        ],
        "parameters": [
          {
            "name": "conta",
            "in": "query",
            "required": false,
            "description": "The account to act on, when it is not yours (partner client, another business of the same owner, admin). Empty = your own.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,64}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tool result, as JSON. With a test key, a tool that writes returns the simulation (`sandbox: true`, `simulado: true`) and nothing is saved.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "Certu-Modo": {
                "$ref": "#/components/headers/CertuModo"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgenteTestarResposta"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Erro400"
          },
          "401": {
            "$ref": "#/components/responses/Erro401"
          },
          "402": {
            "$ref": "#/components/responses/Erro402"
          },
          "403": {
            "$ref": "#/components/responses/Erro403"
          },
          "404": {
            "$ref": "#/components/responses/Erro404"
          },
          "409": {
            "$ref": "#/components/responses/Erro409"
          },
          "413": {
            "$ref": "#/components/responses/Erro413"
          },
          "429": {
            "$ref": "#/components/responses/Erro429"
          },
          "500": {
            "$ref": "#/components/responses/Erro500"
          },
          "502": {
            "$ref": "#/components/responses/Erro502"
          },
          "503": {
            "$ref": "#/components/responses/Erro503"
          },
          "default": {
            "$ref": "#/components/responses/ErroPadrao"
          }
        },
        "x-mcp-tool": "agente_testar",
        "x-scope": "agente:escrever",
        "x-read-only": false,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "conversa"
                ],
                "properties": {
                  "conversa": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 24,
                    "description": "The turns in order. `de` is \"cliente\" (customer) or \"ia\" (the AI). The last one must be the customer's.",
                    "items": {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "de",
                        "texto"
                      ],
                      "properties": {
                        "de": {
                          "type": "string",
                          "enum": [
                            "cliente",
                            "ia"
                          ]
                        },
                        "texto": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 4000
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/anuncios": {
      "get": {
        "operationId": "anuncios_listar",
        "summary": "List campaign kits",
        "description": "Lists the campaign kits already generated, with results for the ones that were published. With `kit_id`, returns the full kit.",
        "tags": [
          "ads"
        ],
        "parameters": [
          {
            "name": "conta",
            "in": "query",
            "required": false,
            "description": "The account to act on, when it is not yours (partner client, another business of the same owner, admin). Empty = your own.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,64}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tool result, as JSON. With a test key, a tool that writes returns the simulation (`sandbox: true`, `simulado: true`) and nothing is saved.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "Certu-Modo": {
                "$ref": "#/components/headers/CertuModo"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KitsDeCampanha"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Erro400"
          },
          "401": {
            "$ref": "#/components/responses/Erro401"
          },
          "402": {
            "$ref": "#/components/responses/Erro402"
          },
          "403": {
            "$ref": "#/components/responses/Erro403"
          },
          "404": {
            "$ref": "#/components/responses/Erro404"
          },
          "429": {
            "$ref": "#/components/responses/Erro429"
          },
          "500": {
            "$ref": "#/components/responses/Erro500"
          },
          "502": {
            "$ref": "#/components/responses/Erro502"
          },
          "503": {
            "$ref": "#/components/responses/Erro503"
          },
          "default": {
            "$ref": "#/components/responses/ErroPadrao"
          }
        },
        "x-mcp-tool": "anuncios_listar",
        "x-scope": "anuncios:ler",
        "x-read-only": true
      }
    },
    "/anuncios/opcoes": {
      "get": {
        "operationId": "anuncio_opcoes",
        "summary": "Ad options",
        "description": "Shows whether the plan allows building campaigns, the credits left, what a campaign kit costs, and the available business types, offers and ad formats.",
        "tags": [
          "ads"
        ],
        "parameters": [
          {
            "name": "conta",
            "in": "query",
            "required": false,
            "description": "The account to act on, when it is not yours (partner client, another business of the same owner, admin). Empty = your own.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,64}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tool result, as JSON. With a test key, a tool that writes returns the simulation (`sandbox: true`, `simulado: true`) and nothing is saved.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "Certu-Modo": {
                "$ref": "#/components/headers/CertuModo"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnuncioOpcoesResposta"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Erro400"
          },
          "401": {
            "$ref": "#/components/responses/Erro401"
          },
          "402": {
            "$ref": "#/components/responses/Erro402"
          },
          "403": {
            "$ref": "#/components/responses/Erro403"
          },
          "404": {
            "$ref": "#/components/responses/Erro404"
          },
          "429": {
            "$ref": "#/components/responses/Erro429"
          },
          "500": {
            "$ref": "#/components/responses/Erro500"
          },
          "502": {
            "$ref": "#/components/responses/Erro502"
          },
          "503": {
            "$ref": "#/components/responses/Erro503"
          },
          "default": {
            "$ref": "#/components/responses/ErroPadrao"
          }
        },
        "x-mcp-tool": "anuncio_opcoes",
        "x-scope": "anuncios:ler",
        "x-read-only": true
      }
    },
    "/anuncios/gerar": {
      "post": {
        "operationId": "anuncio_gerar",
        "summary": "Generate a campaign kit",
        "description": "Builds a Facebook and Instagram campaign kit (copy, images and audience) from the account's knowledge base. Uses plan credits for every kit and publishes nothing.",
        "tags": [
          "ads"
        ],
        "parameters": [
          {
            "name": "conta",
            "in": "query",
            "required": false,
            "description": "The account to act on, when it is not yours (partner client, another business of the same owner, admin). Empty = your own.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,64}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tool result, as JSON. With a test key, a tool that writes returns the simulation (`sandbox: true`, `simulado: true`) and nothing is saved.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "Certu-Modo": {
                "$ref": "#/components/headers/CertuModo"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnuncioGerarResposta"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Erro400"
          },
          "401": {
            "$ref": "#/components/responses/Erro401"
          },
          "402": {
            "$ref": "#/components/responses/Erro402"
          },
          "403": {
            "$ref": "#/components/responses/Erro403"
          },
          "404": {
            "$ref": "#/components/responses/Erro404"
          },
          "409": {
            "$ref": "#/components/responses/Erro409"
          },
          "413": {
            "$ref": "#/components/responses/Erro413"
          },
          "429": {
            "$ref": "#/components/responses/Erro429"
          },
          "500": {
            "$ref": "#/components/responses/Erro500"
          },
          "502": {
            "$ref": "#/components/responses/Erro502"
          },
          "503": {
            "$ref": "#/components/responses/Erro503"
          },
          "default": {
            "$ref": "#/components/responses/ErroPadrao"
          }
        },
        "x-mcp-tool": "anuncio_gerar",
        "x-scope": "anuncios:escrever",
        "x-read-only": false,
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "tipo_de_negocio": {
                    "type": "string",
                    "maxLength": 60,
                    "description": "Slug from anuncio_opcoes (tiposDeNegocio)."
                  },
                  "oferta": {
                    "type": "string",
                    "maxLength": 60,
                    "description": "Slug of an offer for that business type."
                  },
                  "descricao": {
                    "type": "string",
                    "maxLength": 3000,
                    "description": "What to advertise, in free text. Required when there is no tipo_de_negocio."
                  },
                  "orcamento_mensal": {
                    "type": "number",
                    "minimum": 300,
                    "maximum": 10000,
                    "description": "Monthly budget in Brazilian reais."
                  },
                  "formatos": {
                    "type": "array",
                    "maxItems": 3,
                    "items": {
                      "type": "string",
                      "maxLength": 60
                    },
                    "description": "One format slug per creative, in order (see anuncio_opcoes)."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/anuncios/campanhas": {
      "get": {
        "operationId": "anuncios_campanhas",
        "summary": "Campaign results",
        "description": "Lists ALL campaigns of the connected Meta ad account (including ones created directly in Ads Manager), with status, daily budget, spend, results (conversations, leads or purchases) and cost per result since each campaign started, plus the reason for any rejected ad. Read-only: changes nothing on Meta.",
        "tags": [
          "ads"
        ],
        "parameters": [
          {
            "name": "ativas",
            "in": "query",
            "required": false,
            "description": "Only campaigns running right now.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "conta",
            "in": "query",
            "required": false,
            "description": "The account to act on, when it is not yours (partner client, another business of the same owner, admin). Empty = your own.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,64}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tool result, as JSON. With a test key, a tool that writes returns the simulation (`sandbox: true`, `simulado: true`) and nothing is saved.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "Certu-Modo": {
                "$ref": "#/components/headers/CertuModo"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnunciosCampanhasResposta"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Erro400"
          },
          "401": {
            "$ref": "#/components/responses/Erro401"
          },
          "402": {
            "$ref": "#/components/responses/Erro402"
          },
          "403": {
            "$ref": "#/components/responses/Erro403"
          },
          "404": {
            "$ref": "#/components/responses/Erro404"
          },
          "409": {
            "$ref": "#/components/responses/Erro409"
          },
          "429": {
            "$ref": "#/components/responses/Erro429"
          },
          "500": {
            "$ref": "#/components/responses/Erro500"
          },
          "502": {
            "$ref": "#/components/responses/Erro502"
          },
          "503": {
            "$ref": "#/components/responses/Erro503"
          },
          "default": {
            "$ref": "#/components/responses/ErroPadrao"
          }
        },
        "x-mcp-tool": "anuncios_campanhas",
        "x-scope": "anuncios:ler",
        "x-read-only": true
      }
    },
    "/anuncios/campanhas/{campanha_id}": {
      "get": {
        "operationId": "anuncio_relatorio",
        "summary": "Campaign report",
        "description": "Full report of one Meta campaign, read live: spend, results, cost per result, reach, frequency, click-through rate, CPM, audience, each ad with its text, image and own results, and daily spend. `campanha_id` is the campaign id from the campaign list. Read-only.",
        "tags": [
          "ads"
        ],
        "parameters": [
          {
            "name": "campanha_id",
            "in": "path",
            "required": true,
            "description": "The `campanhaId` returned by anuncios_campanhas.",
            "schema": {
              "type": "string",
              "pattern": "^\\d{1,40}$"
            }
          },
          {
            "name": "periodo",
            "in": "query",
            "required": false,
            "description": "Metrics period. Default: everything since the campaign started.",
            "schema": {
              "type": "string",
              "enum": [
                "tudo",
                "30dias",
                "7dias",
                "hoje"
              ]
            }
          },
          {
            "name": "conta",
            "in": "query",
            "required": false,
            "description": "The account to act on, when it is not yours (partner client, another business of the same owner, admin). Empty = your own.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,64}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tool result, as JSON. With a test key, a tool that writes returns the simulation (`sandbox: true`, `simulado: true`) and nothing is saved.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "Certu-Modo": {
                "$ref": "#/components/headers/CertuModo"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnuncioRelatorioResposta"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Erro400"
          },
          "401": {
            "$ref": "#/components/responses/Erro401"
          },
          "402": {
            "$ref": "#/components/responses/Erro402"
          },
          "403": {
            "$ref": "#/components/responses/Erro403"
          },
          "404": {
            "$ref": "#/components/responses/Erro404"
          },
          "409": {
            "$ref": "#/components/responses/Erro409"
          },
          "429": {
            "$ref": "#/components/responses/Erro429"
          },
          "500": {
            "$ref": "#/components/responses/Erro500"
          },
          "502": {
            "$ref": "#/components/responses/Erro502"
          },
          "503": {
            "$ref": "#/components/responses/Erro503"
          },
          "default": {
            "$ref": "#/components/responses/ErroPadrao"
          }
        },
        "x-mcp-tool": "anuncio_relatorio",
        "x-scope": "anuncios:ler",
        "x-read-only": true
      }
    },
    "/anuncios/{kit_id}": {
      "get": {
        "operationId": "anuncios_listar_kit",
        "summary": "List campaign kits (one kit by id)",
        "description": "Lists the campaign kits already generated, with results for the ones that were published. With `kit_id`, returns the full kit.",
        "tags": [
          "ads"
        ],
        "parameters": [
          {
            "name": "kit_id",
            "in": "path",
            "required": true,
            "description": "Id of a kit, to see its full content.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,64}$"
            }
          },
          {
            "name": "conta",
            "in": "query",
            "required": false,
            "description": "The account to act on, when it is not yours (partner client, another business of the same owner, admin). Empty = your own.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,64}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tool result, as JSON. With a test key, a tool that writes returns the simulation (`sandbox: true`, `simulado: true`) and nothing is saved.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "Certu-Modo": {
                "$ref": "#/components/headers/CertuModo"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KitDeCampanha"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Erro400"
          },
          "401": {
            "$ref": "#/components/responses/Erro401"
          },
          "402": {
            "$ref": "#/components/responses/Erro402"
          },
          "403": {
            "$ref": "#/components/responses/Erro403"
          },
          "404": {
            "$ref": "#/components/responses/Erro404"
          },
          "429": {
            "$ref": "#/components/responses/Erro429"
          },
          "500": {
            "$ref": "#/components/responses/Erro500"
          },
          "502": {
            "$ref": "#/components/responses/Erro502"
          },
          "503": {
            "$ref": "#/components/responses/Erro503"
          },
          "default": {
            "$ref": "#/components/responses/ErroPadrao"
          }
        },
        "x-mcp-tool": "anuncios_listar",
        "x-scope": "anuncios:ler",
        "x-read-only": true
      }
    },
    "/anuncios/{campanha_id}/pausar": {
      "post": {
        "operationId": "anuncio_pausar",
        "summary": "Pause a campaign",
        "description": "Pauses a running Meta campaign: it stops delivering and spending immediately. `campanhaId` is the campaign id from the campaign list. There is no way to turn it back on from here; the owner resumes it in the app.",
        "tags": [
          "ads"
        ],
        "parameters": [
          {
            "name": "campanha_id",
            "in": "path",
            "required": true,
            "description": "The `campanhaId` returned by anuncios_campanhas.",
            "schema": {
              "type": "string",
              "pattern": "^\\d{1,40}$"
            }
          },
          {
            "name": "conta",
            "in": "query",
            "required": false,
            "description": "The account to act on, when it is not yours (partner client, another business of the same owner, admin). Empty = your own.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,64}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tool result, as JSON. With a test key, a tool that writes returns the simulation (`sandbox: true`, `simulado: true`) and nothing is saved.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "Certu-Modo": {
                "$ref": "#/components/headers/CertuModo"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnuncioPausarResposta"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Erro400"
          },
          "401": {
            "$ref": "#/components/responses/Erro401"
          },
          "402": {
            "$ref": "#/components/responses/Erro402"
          },
          "403": {
            "$ref": "#/components/responses/Erro403"
          },
          "404": {
            "$ref": "#/components/responses/Erro404"
          },
          "409": {
            "$ref": "#/components/responses/Erro409"
          },
          "429": {
            "$ref": "#/components/responses/Erro429"
          },
          "500": {
            "$ref": "#/components/responses/Erro500"
          },
          "502": {
            "$ref": "#/components/responses/Erro502"
          },
          "503": {
            "$ref": "#/components/responses/Erro503"
          },
          "default": {
            "$ref": "#/components/responses/ErroPadrao"
          }
        },
        "x-mcp-tool": "anuncio_pausar",
        "x-scope": "anuncios:escrever",
        "x-read-only": false
      }
    },
    "/anuncios/{campanha_id}/orcamento": {
      "post": {
        "operationId": "anuncio_orcamento",
        "summary": "Change a campaign's budget",
        "description": "Changes how much a Meta campaign spends per day, in Brazilian reais. The value is the campaign's TOTAL per day: when the budget is split across several ad sets, it is shared among the active ones in today's proportion. This changes real spend on the ad account. A high value or a big jump comes back asking for `confirmar: true`.",
        "tags": [
          "ads"
        ],
        "parameters": [
          {
            "name": "campanha_id",
            "in": "path",
            "required": true,
            "description": "The `campanhaId` returned by anuncios_campanhas.",
            "schema": {
              "type": "string",
              "pattern": "^\\d{1,40}$"
            }
          },
          {
            "name": "conta",
            "in": "query",
            "required": false,
            "description": "The account to act on, when it is not yours (partner client, another business of the same owner, admin). Empty = your own.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,64}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tool result, as JSON. With a test key, a tool that writes returns the simulation (`sandbox: true`, `simulado: true`) and nothing is saved.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "Certu-Modo": {
                "$ref": "#/components/headers/CertuModo"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnuncioOrcamentoResposta"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Erro400"
          },
          "401": {
            "$ref": "#/components/responses/Erro401"
          },
          "402": {
            "$ref": "#/components/responses/Erro402"
          },
          "403": {
            "$ref": "#/components/responses/Erro403"
          },
          "404": {
            "$ref": "#/components/responses/Erro404"
          },
          "409": {
            "$ref": "#/components/responses/Erro409"
          },
          "413": {
            "$ref": "#/components/responses/Erro413"
          },
          "429": {
            "$ref": "#/components/responses/Erro429"
          },
          "500": {
            "$ref": "#/components/responses/Erro500"
          },
          "502": {
            "$ref": "#/components/responses/Erro502"
          },
          "503": {
            "$ref": "#/components/responses/Erro503"
          },
          "default": {
            "$ref": "#/components/responses/ErroPadrao"
          }
        },
        "x-mcp-tool": "anuncio_orcamento",
        "x-scope": "anuncios:escrever",
        "x-read-only": false,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "orcamento_diario"
                ],
                "properties": {
                  "orcamento_diario": {
                    "type": "number",
                    "minimum": 5,
                    "maximum": 10000,
                    "description": "New daily total for the campaign, in Brazilian reais."
                  },
                  "confirmar": {
                    "type": "boolean",
                    "description": "Only after the owner confirms the amount returned in `precisaConfirmar`. Never send it on the first attempt."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/anuncios/{kit_id}/publicar": {
      "post": {
        "operationId": "anuncio_publicar_pausado",
        "summary": "Publish a paused campaign",
        "description": "Creates a kit's campaign in the owner's Meta ad account, ALWAYS PAUSED: nothing runs and nothing is spent until the owner turns it on in Meta Ads Manager. Requires the Meta account to be connected in the CertuAI app.",
        "tags": [
          "ads"
        ],
        "parameters": [
          {
            "name": "kit_id",
            "in": "path",
            "required": true,
            "description": "The kitId returned by anuncio_gerar or anuncios_listar.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,64}$"
            }
          },
          {
            "name": "conta",
            "in": "query",
            "required": false,
            "description": "The account to act on, when it is not yours (partner client, another business of the same owner, admin). Empty = your own.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,64}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tool result, as JSON. With a test key, a tool that writes returns the simulation (`sandbox: true`, `simulado: true`) and nothing is saved.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "Certu-Modo": {
                "$ref": "#/components/headers/CertuModo"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnuncioPublicarPausadoResposta"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Erro400"
          },
          "401": {
            "$ref": "#/components/responses/Erro401"
          },
          "402": {
            "$ref": "#/components/responses/Erro402"
          },
          "403": {
            "$ref": "#/components/responses/Erro403"
          },
          "404": {
            "$ref": "#/components/responses/Erro404"
          },
          "409": {
            "$ref": "#/components/responses/Erro409"
          },
          "413": {
            "$ref": "#/components/responses/Erro413"
          },
          "429": {
            "$ref": "#/components/responses/Erro429"
          },
          "500": {
            "$ref": "#/components/responses/Erro500"
          },
          "502": {
            "$ref": "#/components/responses/Erro502"
          },
          "503": {
            "$ref": "#/components/responses/Erro503"
          },
          "default": {
            "$ref": "#/components/responses/ErroPadrao"
          }
        },
        "x-mcp-tool": "anuncio_publicar_pausado",
        "x-scope": "anuncios:escrever",
        "x-read-only": false,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "orcamento_diario"
                ],
                "properties": {
                  "orcamento_diario": {
                    "type": "number",
                    "minimum": 5,
                    "maximum": 10000,
                    "description": "Daily budget in Brazilian reais, once the owner turns it on."
                  },
                  "link": {
                    "type": "string",
                    "maxLength": 500,
                    "description": "Where the ad takes people. Without a link, it goes to the Facebook Page."
                  },
                  "pagina_id": {
                    "type": "string",
                    "pattern": "^\\d{1,40}$",
                    "description": "Facebook Page that runs the ad. Default: the one chosen in the app."
                  },
                  "conta_de_anuncios_id": {
                    "type": "string",
                    "pattern": "^(act_)?\\d{1,40}$",
                    "description": "Ad account. Default: the one chosen in the app."
                  },
                  "categoria_especial": {
                    "type": "string",
                    "maxLength": 60,
                    "description": "Only when the OWNER says the ad is about credit, employment, housing, politics or gambling."
                  },
                  "whatsapp": {
                    "type": "string",
                    "maxLength": 30,
                    "description": "Messaging campaign: the WhatsApp number the ad opens, with country and area code. Default: the last confirmed one or the connected number. Meta checks that it is linked to the Page before creating; if it is not, nothing is published and the reply says how to link it."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/site": {
      "get": {
        "operationId": "site_ler",
        "summary": "View the website",
        "description": "Shows the account's business website: whether it exists, whether it is published, its address and the content of its pages. The full text of blog articles is not included.",
        "tags": [
          "website"
        ],
        "parameters": [
          {
            "name": "conta",
            "in": "query",
            "required": false,
            "description": "The account to act on, when it is not yours (partner client, another business of the same owner, admin). Empty = your own.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,64}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tool result, as JSON. With a test key, a tool that writes returns the simulation (`sandbox: true`, `simulado: true`) and nothing is saved.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "Certu-Modo": {
                "$ref": "#/components/headers/CertuModo"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SiteLerResposta"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Erro400"
          },
          "401": {
            "$ref": "#/components/responses/Erro401"
          },
          "402": {
            "$ref": "#/components/responses/Erro402"
          },
          "403": {
            "$ref": "#/components/responses/Erro403"
          },
          "404": {
            "$ref": "#/components/responses/Erro404"
          },
          "429": {
            "$ref": "#/components/responses/Erro429"
          },
          "500": {
            "$ref": "#/components/responses/Erro500"
          },
          "502": {
            "$ref": "#/components/responses/Erro502"
          },
          "503": {
            "$ref": "#/components/responses/Erro503"
          },
          "default": {
            "$ref": "#/components/responses/ErroPadrao"
          }
        },
        "x-mcp-tool": "site_ler",
        "x-scope": "site:ler",
        "x-read-only": true
      }
    },
    "/site/criar": {
      "post": {
        "operationId": "site_criar",
        "summary": "Build the website with AI",
        "description": "Builds the business website with AI from the name, the business type and the knowledge base. If the account already has a website, it is replaced entirely (the previous one is kept as a backup) and only runs with `substituir: true`. May use credits.",
        "tags": [
          "website"
        ],
        "parameters": [
          {
            "name": "conta",
            "in": "query",
            "required": false,
            "description": "The account to act on, when it is not yours (partner client, another business of the same owner, admin). Empty = your own.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,64}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tool result, as JSON. With a test key, a tool that writes returns the simulation (`sandbox: true`, `simulado: true`) and nothing is saved.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "Certu-Modo": {
                "$ref": "#/components/headers/CertuModo"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SiteCriarResposta"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Erro400"
          },
          "401": {
            "$ref": "#/components/responses/Erro401"
          },
          "402": {
            "$ref": "#/components/responses/Erro402"
          },
          "403": {
            "$ref": "#/components/responses/Erro403"
          },
          "404": {
            "$ref": "#/components/responses/Erro404"
          },
          "409": {
            "$ref": "#/components/responses/Erro409"
          },
          "413": {
            "$ref": "#/components/responses/Erro413"
          },
          "429": {
            "$ref": "#/components/responses/Erro429"
          },
          "500": {
            "$ref": "#/components/responses/Erro500"
          },
          "502": {
            "$ref": "#/components/responses/Erro502"
          },
          "503": {
            "$ref": "#/components/responses/Erro503"
          },
          "default": {
            "$ref": "#/components/responses/ErroPadrao"
          }
        },
        "x-mcp-tool": "site_criar",
        "x-scope": "site:escrever",
        "x-read-only": false,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "nome",
                  "segmento"
                ],
                "properties": {
                  "nome": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80,
                    "description": "Business name."
                  },
                  "segmento": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80,
                    "description": "What the business does, for example \"dental clinic\"."
                  },
                  "cidade": {
                    "type": "string",
                    "maxLength": 60,
                    "description": "City where it serves customers."
                  },
                  "whatsapp": {
                    "type": "string",
                    "maxLength": 20,
                    "description": "The business's WhatsApp number, with country and area code."
                  },
                  "substituir": {
                    "type": "boolean",
                    "description": "true only when the owner confirmed replacing the existing website."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/site/publicar": {
      "post": {
        "operationId": "site_publicar",
        "summary": "Publish the website",
        "description": "Puts the website live at the chosen address (lowercase letters, numbers and hyphens). Only works when the plan includes the website.",
        "tags": [
          "website"
        ],
        "parameters": [
          {
            "name": "conta",
            "in": "query",
            "required": false,
            "description": "The account to act on, when it is not yours (partner client, another business of the same owner, admin). Empty = your own.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,64}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tool result, as JSON. With a test key, a tool that writes returns the simulation (`sandbox: true`, `simulado: true`) and nothing is saved.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "Certu-Modo": {
                "$ref": "#/components/headers/CertuModo"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SitePublicarResposta"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Erro400"
          },
          "401": {
            "$ref": "#/components/responses/Erro401"
          },
          "402": {
            "$ref": "#/components/responses/Erro402"
          },
          "403": {
            "$ref": "#/components/responses/Erro403"
          },
          "404": {
            "$ref": "#/components/responses/Erro404"
          },
          "409": {
            "$ref": "#/components/responses/Erro409"
          },
          "413": {
            "$ref": "#/components/responses/Erro413"
          },
          "429": {
            "$ref": "#/components/responses/Erro429"
          },
          "500": {
            "$ref": "#/components/responses/Erro500"
          },
          "502": {
            "$ref": "#/components/responses/Erro502"
          },
          "503": {
            "$ref": "#/components/responses/Erro503"
          },
          "default": {
            "$ref": "#/components/responses/ErroPadrao"
          }
        },
        "x-mcp-tool": "site_publicar",
        "x-scope": "site:escrever",
        "x-read-only": false,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "endereco"
                ],
                "properties": {
                  "endereco": {
                    "type": "string",
                    "pattern": "^[a-z0-9][a-z0-9-]{1,40}$",
                    "description": "The end of the address, for example \"smile-dental\"."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/site/artigos": {
      "get": {
        "operationId": "site_artigos",
        "summary": "Website blog articles",
        "description": "Lists the website's blog articles, newest first. With `slug`, returns the full article.",
        "tags": [
          "website"
        ],
        "parameters": [
          {
            "name": "conta",
            "in": "query",
            "required": false,
            "description": "The account to act on, when it is not yours (partner client, another business of the same owner, admin). Empty = your own.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,64}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tool result, as JSON. With a test key, a tool that writes returns the simulation (`sandbox: true`, `simulado: true`) and nothing is saved.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "Certu-Modo": {
                "$ref": "#/components/headers/CertuModo"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ArtigosDoSite"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Erro400"
          },
          "401": {
            "$ref": "#/components/responses/Erro401"
          },
          "402": {
            "$ref": "#/components/responses/Erro402"
          },
          "403": {
            "$ref": "#/components/responses/Erro403"
          },
          "404": {
            "$ref": "#/components/responses/Erro404"
          },
          "429": {
            "$ref": "#/components/responses/Erro429"
          },
          "500": {
            "$ref": "#/components/responses/Erro500"
          },
          "502": {
            "$ref": "#/components/responses/Erro502"
          },
          "503": {
            "$ref": "#/components/responses/Erro503"
          },
          "default": {
            "$ref": "#/components/responses/ErroPadrao"
          }
        },
        "x-mcp-tool": "site_artigos",
        "x-scope": "site:ler",
        "x-read-only": true
      }
    },
    "/site/artigos/{slug}": {
      "get": {
        "operationId": "site_artigo_ler",
        "summary": "Website blog articles (one article by slug)",
        "description": "Lists the website's blog articles, newest first. With `slug`, returns the full article.",
        "tags": [
          "website"
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "description": "The slug of an article, to read its full text.",
            "schema": {
              "type": "string",
              "maxLength": 120
            }
          },
          {
            "name": "conta",
            "in": "query",
            "required": false,
            "description": "The account to act on, when it is not yours (partner client, another business of the same owner, admin). Empty = your own.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,64}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tool result, as JSON. With a test key, a tool that writes returns the simulation (`sandbox: true`, `simulado: true`) and nothing is saved.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "Certu-Modo": {
                "$ref": "#/components/headers/CertuModo"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ArtigoDoSite"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Erro400"
          },
          "401": {
            "$ref": "#/components/responses/Erro401"
          },
          "402": {
            "$ref": "#/components/responses/Erro402"
          },
          "403": {
            "$ref": "#/components/responses/Erro403"
          },
          "404": {
            "$ref": "#/components/responses/Erro404"
          },
          "429": {
            "$ref": "#/components/responses/Erro429"
          },
          "500": {
            "$ref": "#/components/responses/Erro500"
          },
          "502": {
            "$ref": "#/components/responses/Erro502"
          },
          "503": {
            "$ref": "#/components/responses/Erro503"
          },
          "default": {
            "$ref": "#/components/responses/ErroPadrao"
          }
        },
        "x-mcp-tool": "site_artigos",
        "x-scope": "site:ler",
        "x-read-only": true
      }
    },
    "/google": {
      "get": {
        "operationId": "google_perfil",
        "summary": "Google Business Profile",
        "description": "Shows whether the business profile on Google (the Google Maps one) is connected and which one: name, city, category and the Maps and review-request links. If Google has not enabled the connection yet, it says so. Read-only.",
        "tags": [
          "google-business-profile"
        ],
        "parameters": [
          {
            "name": "conta",
            "in": "query",
            "required": false,
            "description": "The account to act on, when it is not yours (partner client, another business of the same owner, admin). Empty = your own.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,64}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tool result, as JSON. With a test key, a tool that writes returns the simulation (`sandbox: true`, `simulado: true`) and nothing is saved.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "Certu-Modo": {
                "$ref": "#/components/headers/CertuModo"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GooglePerfilResposta"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Erro400"
          },
          "401": {
            "$ref": "#/components/responses/Erro401"
          },
          "402": {
            "$ref": "#/components/responses/Erro402"
          },
          "403": {
            "$ref": "#/components/responses/Erro403"
          },
          "404": {
            "$ref": "#/components/responses/Erro404"
          },
          "409": {
            "$ref": "#/components/responses/Erro409"
          },
          "429": {
            "$ref": "#/components/responses/Erro429"
          },
          "500": {
            "$ref": "#/components/responses/Erro500"
          },
          "502": {
            "$ref": "#/components/responses/Erro502"
          },
          "503": {
            "$ref": "#/components/responses/Erro503"
          },
          "default": {
            "$ref": "#/components/responses/ErroPadrao"
          }
        },
        "x-mcp-tool": "google_perfil",
        "x-scope": "google:ler",
        "x-read-only": true
      }
    },
    "/google/avaliacoes": {
      "get": {
        "operationId": "google_avaliacoes",
        "summary": "Google reviews",
        "description": "Lists the latest reviews of the business's Google profile, with the average rating, the total, each review (who, stars, comment, when) and the business's reply, if any. Read-only.",
        "tags": [
          "google-business-profile"
        ],
        "parameters": [
          {
            "name": "sem_resposta",
            "in": "query",
            "required": false,
            "description": "Only reviews the business has not replied to yet.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "conta",
            "in": "query",
            "required": false,
            "description": "The account to act on, when it is not yours (partner client, another business of the same owner, admin). Empty = your own.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,64}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tool result, as JSON. With a test key, a tool that writes returns the simulation (`sandbox: true`, `simulado: true`) and nothing is saved.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "Certu-Modo": {
                "$ref": "#/components/headers/CertuModo"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GoogleAvaliacoesResposta"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Erro400"
          },
          "401": {
            "$ref": "#/components/responses/Erro401"
          },
          "402": {
            "$ref": "#/components/responses/Erro402"
          },
          "403": {
            "$ref": "#/components/responses/Erro403"
          },
          "404": {
            "$ref": "#/components/responses/Erro404"
          },
          "409": {
            "$ref": "#/components/responses/Erro409"
          },
          "429": {
            "$ref": "#/components/responses/Erro429"
          },
          "500": {
            "$ref": "#/components/responses/Erro500"
          },
          "502": {
            "$ref": "#/components/responses/Erro502"
          },
          "503": {
            "$ref": "#/components/responses/Erro503"
          },
          "default": {
            "$ref": "#/components/responses/ErroPadrao"
          }
        },
        "x-mcp-tool": "google_avaliacoes",
        "x-scope": "google:ler",
        "x-read-only": true
      }
    },
    "/google/rascunho": {
      "post": {
        "operationId": "google_rascunho",
        "summary": "Draft for Google",
        "description": "Writes, from what the account taught about the business, a draft reply to a review (`tipo: resposta`, with `avaliacao`) or the profile's weekly post (`tipo: post`, with optional `tema`). Uses credits and does NOT publish: the draft only reaches Google when it is published separately.",
        "tags": [
          "google-business-profile"
        ],
        "parameters": [
          {
            "name": "conta",
            "in": "query",
            "required": false,
            "description": "The account to act on, when it is not yours (partner client, another business of the same owner, admin). Empty = your own.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,64}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tool result, as JSON. With a test key, a tool that writes returns the simulation (`sandbox: true`, `simulado: true`) and nothing is saved.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "Certu-Modo": {
                "$ref": "#/components/headers/CertuModo"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GoogleRascunhoResposta"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Erro400"
          },
          "401": {
            "$ref": "#/components/responses/Erro401"
          },
          "402": {
            "$ref": "#/components/responses/Erro402"
          },
          "403": {
            "$ref": "#/components/responses/Erro403"
          },
          "404": {
            "$ref": "#/components/responses/Erro404"
          },
          "409": {
            "$ref": "#/components/responses/Erro409"
          },
          "413": {
            "$ref": "#/components/responses/Erro413"
          },
          "429": {
            "$ref": "#/components/responses/Erro429"
          },
          "500": {
            "$ref": "#/components/responses/Erro500"
          },
          "502": {
            "$ref": "#/components/responses/Erro502"
          },
          "503": {
            "$ref": "#/components/responses/Erro503"
          },
          "default": {
            "$ref": "#/components/responses/ErroPadrao"
          }
        },
        "x-mcp-tool": "google_rascunho",
        "x-scope": "google:escrever",
        "x-read-only": false,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "tipo"
                ],
                "properties": {
                  "tipo": {
                    "type": "string",
                    "enum": [
                      "resposta",
                      "post"
                    ]
                  },
                  "avaliacao": {
                    "type": "string",
                    "pattern": "^accounts/[^/]{1,80}/locations/[^/]{1,80}/reviews/[^/]{1,200}$",
                    "description": "The `avaliacao` from google_avaliacoes. Required for a reply."
                  },
                  "tema": {
                    "type": "string",
                    "maxLength": 200,
                    "description": "What the post is about, for example \"holiday hours\". Optional."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/google/publicar": {
      "post": {
        "operationId": "google_publicar",
        "summary": "Publish on Google",
        "description": "PUBLISHES on the Google profile, visible to anyone: a reply to a review (`tipo: resposta`, with `avaliacao` and `texto`; replaces the previous reply, if any) or a profile post (`tipo: post`, with `texto`). Only with the EXACT text the owner read and approved in this conversation.",
        "tags": [
          "google-business-profile"
        ],
        "parameters": [
          {
            "name": "conta",
            "in": "query",
            "required": false,
            "description": "The account to act on, when it is not yours (partner client, another business of the same owner, admin). Empty = your own.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,64}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tool result, as JSON. With a test key, a tool that writes returns the simulation (`sandbox: true`, `simulado: true`) and nothing is saved.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "Certu-Modo": {
                "$ref": "#/components/headers/CertuModo"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GooglePublicarResposta"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Erro400"
          },
          "401": {
            "$ref": "#/components/responses/Erro401"
          },
          "402": {
            "$ref": "#/components/responses/Erro402"
          },
          "403": {
            "$ref": "#/components/responses/Erro403"
          },
          "404": {
            "$ref": "#/components/responses/Erro404"
          },
          "409": {
            "$ref": "#/components/responses/Erro409"
          },
          "413": {
            "$ref": "#/components/responses/Erro413"
          },
          "429": {
            "$ref": "#/components/responses/Erro429"
          },
          "500": {
            "$ref": "#/components/responses/Erro500"
          },
          "502": {
            "$ref": "#/components/responses/Erro502"
          },
          "503": {
            "$ref": "#/components/responses/Erro503"
          },
          "default": {
            "$ref": "#/components/responses/ErroPadrao"
          }
        },
        "x-mcp-tool": "google_publicar",
        "x-scope": "google:escrever",
        "x-read-only": false,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "tipo",
                  "texto"
                ],
                "properties": {
                  "tipo": {
                    "type": "string",
                    "enum": [
                      "resposta",
                      "post"
                    ]
                  },
                  "avaliacao": {
                    "type": "string",
                    "pattern": "^accounts/[^/]{1,80}/locations/[^/]{1,80}/reviews/[^/]{1,200}$",
                    "description": "The `avaliacao` from google_avaliacoes. Required for a reply."
                  },
                  "texto": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 4000,
                    "description": "The text the owner approved, unchanged."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/google/concorrentes": {
      "get": {
        "operationId": "google_concorrentes",
        "summary": "Competitors on Google Maps",
        "description": "Shows who appears on Google Maps when customers search for the service in the business's city, with each competitor's rating and review count, and the business's position in each search. Without `palavras`, it uses the keywords the owner already registered. Read-only.",
        "tags": [
          "google-business-profile"
        ],
        "parameters": [
          {
            "name": "palavras",
            "in": "query",
            "required": false,
            "description": "What customers type, for example \"dentist\" or \"pizza\". Up to 3. Separate items with commas.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "conta",
            "in": "query",
            "required": false,
            "description": "The account to act on, when it is not yours (partner client, another business of the same owner, admin). Empty = your own.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,64}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tool result, as JSON. With a test key, a tool that writes returns the simulation (`sandbox: true`, `simulado: true`) and nothing is saved.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "Certu-Modo": {
                "$ref": "#/components/headers/CertuModo"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GoogleConcorrentesResposta"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Erro400"
          },
          "401": {
            "$ref": "#/components/responses/Erro401"
          },
          "402": {
            "$ref": "#/components/responses/Erro402"
          },
          "403": {
            "$ref": "#/components/responses/Erro403"
          },
          "404": {
            "$ref": "#/components/responses/Erro404"
          },
          "409": {
            "$ref": "#/components/responses/Erro409"
          },
          "429": {
            "$ref": "#/components/responses/Erro429"
          },
          "500": {
            "$ref": "#/components/responses/Erro500"
          },
          "502": {
            "$ref": "#/components/responses/Erro502"
          },
          "503": {
            "$ref": "#/components/responses/Erro503"
          },
          "default": {
            "$ref": "#/components/responses/ErroPadrao"
          }
        },
        "x-mcp-tool": "google_concorrentes",
        "x-scope": "google:ler",
        "x-read-only": true
      }
    },
    "/parceiro/clientes": {
      "get": {
        "operationId": "parceiro_clientes",
        "summary": "Partner's clients",
        "description": "For a PARTNER (reseller): lists its clients, with each one's `conta`, business name, whether WhatsApp is connected, the plan and the license end date. The `conta` value selects that client's account in the other operations. A non-partner gets `nao_parceiro`. Read-only.",
        "tags": [
          "partners"
        ],
        "parameters": [
          {
            "name": "busca",
            "in": "query",
            "required": false,
            "description": "Part of the business name or email.",
            "schema": {
              "type": "string",
              "maxLength": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tool result, as JSON. With a test key, a tool that writes returns the simulation (`sandbox: true`, `simulado: true`) and nothing is saved.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "Certu-Modo": {
                "$ref": "#/components/headers/CertuModo"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ParceiroClientesResposta"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Erro400"
          },
          "401": {
            "$ref": "#/components/responses/Erro401"
          },
          "402": {
            "$ref": "#/components/responses/Erro402"
          },
          "403": {
            "$ref": "#/components/responses/Erro403"
          },
          "404": {
            "$ref": "#/components/responses/Erro404"
          },
          "429": {
            "$ref": "#/components/responses/Erro429"
          },
          "500": {
            "$ref": "#/components/responses/Erro500"
          },
          "502": {
            "$ref": "#/components/responses/Erro502"
          },
          "503": {
            "$ref": "#/components/responses/Erro503"
          },
          "default": {
            "$ref": "#/components/responses/ErroPadrao"
          }
        },
        "x-mcp-tool": "parceiro_clientes",
        "x-scope": "parceiro:ler",
        "x-read-only": true
      }
    },
    "/crm": {
      "post": {
        "operationId": "crm_alterar",
        "summary": "Update the CRM",
        "description": "Makes up to 20 CRM changes at once: create or update a contact, create a deal (creating the contact if needed), change a deal's stage, value, title or fields, create or complete a task, and add a note to a contact or deal. Moving a stage records the same event as dragging the card, so the stage's message sequence, if the account has one, applies the same way. Nothing is deleted. If any operation cannot be done, none is done and the reply says why.",
        "tags": [
          "crm"
        ],
        "parameters": [
          {
            "name": "conta",
            "in": "query",
            "required": false,
            "description": "The account to act on, when it is not yours (partner client, another business of the same owner, admin). Empty = your own.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,64}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tool result, as JSON. With a test key, a tool that writes returns the simulation (`sandbox: true`, `simulado: true`) and nothing is saved.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "Certu-Modo": {
                "$ref": "#/components/headers/CertuModo"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrmAlterarResposta"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Erro400"
          },
          "401": {
            "$ref": "#/components/responses/Erro401"
          },
          "402": {
            "$ref": "#/components/responses/Erro402"
          },
          "403": {
            "$ref": "#/components/responses/Erro403"
          },
          "404": {
            "$ref": "#/components/responses/Erro404"
          },
          "409": {
            "$ref": "#/components/responses/Erro409"
          },
          "413": {
            "$ref": "#/components/responses/Erro413"
          },
          "429": {
            "$ref": "#/components/responses/Erro429"
          },
          "500": {
            "$ref": "#/components/responses/Erro500"
          },
          "503": {
            "$ref": "#/components/responses/Erro503"
          },
          "default": {
            "$ref": "#/components/responses/ErroPadrao"
          }
        },
        "x-mcp-tool": "crm_alterar",
        "x-scope": "crm:escrever",
        "x-read-only": false,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "operacoes"
                ],
                "properties": {
                  "operacoes": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 20,
                    "items": {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "acao"
                      ],
                      "properties": {
                        "acao": {
                          "type": "string",
                          "enum": [
                            "criar_contato",
                            "atualizar_contato",
                            "criar_negocio",
                            "atualizar_negocio",
                            "criar_tarefa",
                            "concluir_tarefa",
                            "anotar"
                          ],
                          "description": "What to do."
                        },
                        "id": {
                          "type": "string",
                          "pattern": "^[A-Za-z0-9_-]{1,64}$",
                          "description": "Id of the contact, deal or task (from crm_contatos, crm_funil or crm_tarefas). Required to update, complete and add a note."
                        },
                        "nome": {
                          "type": "string",
                          "maxLength": 120,
                          "description": "Contact's name."
                        },
                        "telefone": {
                          "type": "string",
                          "maxLength": 30
                        },
                        "email": {
                          "type": "string",
                          "maxLength": 200
                        },
                        "empresa": {
                          "type": "string",
                          "maxLength": 120
                        },
                        "titulo": {
                          "type": "string",
                          "maxLength": 160,
                          "description": "Title of the deal or task."
                        },
                        "valor": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 100000000,
                          "description": "Deal value in Brazilian reais."
                        },
                        "etapa": {
                          "type": "string",
                          "maxLength": 60,
                          "description": "The `etapaId` from crm_funil."
                        },
                        "contato": {
                          "type": "string",
                          "maxLength": 120,
                          "description": "Name of the contact for the deal or task."
                        },
                        "prazo": {
                          "type": "string",
                          "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                          "description": "Task due date, YYYY-MM-DD."
                        },
                        "nota": {
                          "type": "string",
                          "maxLength": 2000,
                          "description": "Note text."
                        },
                        "nota_em": {
                          "type": "string",
                          "enum": [
                            "contato",
                            "negocio"
                          ],
                          "description": "Where the `anotar` note goes. Default: contact."
                        },
                        "campos": {
                          "type": "object",
                          "description": "Pipeline fields of the deal: {\"field id\": \"value\"}. Ids in crm_funil."
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/crm/funil": {
      "get": {
        "operationId": "crm_funil",
        "summary": "View the sales pipeline",
        "description": "Shows the CRM sales pipeline: each stage with how many deals and their total, and the deals (customer, value, stage, time without movement, fields and latest notes). Filters by stage and keyword. Also returns the ids of the stages and fields. Read-only.",
        "tags": [
          "crm"
        ],
        "parameters": [
          {
            "name": "etapa",
            "in": "query",
            "required": false,
            "description": "Only deals in this stage (the `etapaId`).",
            "schema": {
              "type": "string",
              "maxLength": 60
            }
          },
          {
            "name": "busca",
            "in": "query",
            "required": false,
            "description": "Word in the title, customer, phone or notes.",
            "schema": {
              "type": "string",
              "maxLength": 100
            }
          },
          {
            "name": "parados",
            "in": "query",
            "required": false,
            "description": "Only deals that have not changed stage for at least this many days.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 365
            }
          },
          {
            "name": "limite",
            "in": "query",
            "required": false,
            "description": "How many deals to return, most recent first. Default 50; 0 returns only the stage summary.",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 200
            }
          },
          {
            "name": "conta",
            "in": "query",
            "required": false,
            "description": "The account to act on, when it is not yours (partner client, another business of the same owner, admin). Empty = your own.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,64}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tool result, as JSON. With a test key, a tool that writes returns the simulation (`sandbox: true`, `simulado: true`) and nothing is saved.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "Certu-Modo": {
                "$ref": "#/components/headers/CertuModo"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrmFunilResposta"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Erro400"
          },
          "401": {
            "$ref": "#/components/responses/Erro401"
          },
          "402": {
            "$ref": "#/components/responses/Erro402"
          },
          "403": {
            "$ref": "#/components/responses/Erro403"
          },
          "404": {
            "$ref": "#/components/responses/Erro404"
          },
          "429": {
            "$ref": "#/components/responses/Erro429"
          },
          "500": {
            "$ref": "#/components/responses/Erro500"
          },
          "503": {
            "$ref": "#/components/responses/Erro503"
          },
          "default": {
            "$ref": "#/components/responses/ErroPadrao"
          }
        },
        "x-mcp-tool": "crm_funil",
        "x-scope": "crm:ler",
        "x-read-only": true
      }
    },
    "/crm/contatos": {
      "get": {
        "operationId": "crm_contatos",
        "summary": "Search contacts",
        "description": "Searches CRM contacts by name, phone, email or company, with how many deals each has. Without a search, lists the most recent. Read-only.",
        "tags": [
          "crm"
        ],
        "parameters": [
          {
            "name": "busca",
            "in": "query",
            "required": false,
            "description": "Name, phone (digits only is fine), email or company.",
            "schema": {
              "type": "string",
              "maxLength": 100
            }
          },
          {
            "name": "limite",
            "in": "query",
            "required": false,
            "description": "How many contacts to return. Default 30.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "conta",
            "in": "query",
            "required": false,
            "description": "The account to act on, when it is not yours (partner client, another business of the same owner, admin). Empty = your own.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,64}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tool result, as JSON. With a test key, a tool that writes returns the simulation (`sandbox: true`, `simulado: true`) and nothing is saved.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "Certu-Modo": {
                "$ref": "#/components/headers/CertuModo"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrmContatosResposta"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Erro400"
          },
          "401": {
            "$ref": "#/components/responses/Erro401"
          },
          "402": {
            "$ref": "#/components/responses/Erro402"
          },
          "403": {
            "$ref": "#/components/responses/Erro403"
          },
          "404": {
            "$ref": "#/components/responses/Erro404"
          },
          "429": {
            "$ref": "#/components/responses/Erro429"
          },
          "500": {
            "$ref": "#/components/responses/Erro500"
          },
          "503": {
            "$ref": "#/components/responses/Erro503"
          },
          "default": {
            "$ref": "#/components/responses/ErroPadrao"
          }
        },
        "x-mcp-tool": "crm_contatos",
        "x-scope": "crm:ler",
        "x-read-only": true
      }
    },
    "/crm/tarefas": {
      "get": {
        "operationId": "crm_tarefas",
        "summary": "View tasks",
        "description": "Lists open CRM tasks, overdue and due-today first (Brasília date). Read-only.",
        "tags": [
          "crm"
        ],
        "parameters": [
          {
            "name": "quais",
            "in": "query",
            "required": false,
            "description": "Default: all open tasks.",
            "schema": {
              "type": "string",
              "enum": [
                "todas",
                "atrasadas",
                "hoje",
                "sem_prazo"
              ]
            }
          },
          {
            "name": "conta",
            "in": "query",
            "required": false,
            "description": "The account to act on, when it is not yours (partner client, another business of the same owner, admin). Empty = your own.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,64}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tool result, as JSON. With a test key, a tool that writes returns the simulation (`sandbox: true`, `simulado: true`) and nothing is saved.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "Certu-Modo": {
                "$ref": "#/components/headers/CertuModo"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrmTarefasResposta"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Erro400"
          },
          "401": {
            "$ref": "#/components/responses/Erro401"
          },
          "402": {
            "$ref": "#/components/responses/Erro402"
          },
          "403": {
            "$ref": "#/components/responses/Erro403"
          },
          "404": {
            "$ref": "#/components/responses/Erro404"
          },
          "429": {
            "$ref": "#/components/responses/Erro429"
          },
          "500": {
            "$ref": "#/components/responses/Erro500"
          },
          "503": {
            "$ref": "#/components/responses/Erro503"
          },
          "default": {
            "$ref": "#/components/responses/ErroPadrao"
          }
        },
        "x-mcp-tool": "crm_tarefas",
        "x-scope": "crm:ler",
        "x-read-only": true
      }
    },
    "/ligacoes": {
      "get": {
        "operationId": "ligacoes_listar",
        "summary": "List phone calls",
        "description": "Lists the account's phone calls, newest first: the ones the voice agent answered and the ones the team made from the dialer. Each comes with the caller, duration, reason, summary, notes and whether a callback was requested. The full transcript is not in the list. Read-only.",
        "tags": [
          "calls"
        ],
        "parameters": [
          {
            "name": "limite",
            "in": "query",
            "required": false,
            "description": "How many calls to return. Default 30.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "retorno",
            "in": "query",
            "required": false,
            "description": "Only calls where the caller asked to speak with someone on the team.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "tipo",
            "in": "query",
            "required": false,
            "description": "atendente = answered or made by the voice agent; equipe = made by a person from the dialer.",
            "schema": {
              "type": "string",
              "enum": [
                "atendente",
                "equipe"
              ]
            }
          },
          {
            "name": "busca",
            "in": "query",
            "required": false,
            "description": "Word in the name, phone, reason or summary.",
            "schema": {
              "type": "string",
              "maxLength": 100
            }
          },
          {
            "name": "de",
            "in": "query",
            "required": false,
            "description": "Only calls from this day on, YYYY-MM-DD.",
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            }
          },
          {
            "name": "conta",
            "in": "query",
            "required": false,
            "description": "The account to act on, when it is not yours (partner client, another business of the same owner, admin). Empty = your own.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,64}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tool result, as JSON. With a test key, a tool that writes returns the simulation (`sandbox: true`, `simulado: true`) and nothing is saved.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "Certu-Modo": {
                "$ref": "#/components/headers/CertuModo"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LigacoesListarResposta"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Erro400"
          },
          "401": {
            "$ref": "#/components/responses/Erro401"
          },
          "402": {
            "$ref": "#/components/responses/Erro402"
          },
          "403": {
            "$ref": "#/components/responses/Erro403"
          },
          "404": {
            "$ref": "#/components/responses/Erro404"
          },
          "429": {
            "$ref": "#/components/responses/Erro429"
          },
          "500": {
            "$ref": "#/components/responses/Erro500"
          },
          "503": {
            "$ref": "#/components/responses/Erro503"
          },
          "default": {
            "$ref": "#/components/responses/ErroPadrao"
          }
        },
        "x-mcp-tool": "ligacoes_listar",
        "x-scope": "ligacoes:ler",
        "x-read-only": true
      }
    },
    "/ligacoes/{id}": {
      "get": {
        "operationId": "ligacao_ler",
        "summary": "Read a phone call",
        "description": "One full call: summary, notes, the owner's corrections and the transcript, turn by turn. `id` is the call id from the call list. Read-only.",
        "tags": [
          "calls"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The `id` returned by ligacoes_listar.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,80}$"
            }
          },
          {
            "name": "conta",
            "in": "query",
            "required": false,
            "description": "The account to act on, when it is not yours (partner client, another business of the same owner, admin). Empty = your own.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,64}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tool result, as JSON. With a test key, a tool that writes returns the simulation (`sandbox: true`, `simulado: true`) and nothing is saved.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "Certu-Modo": {
                "$ref": "#/components/headers/CertuModo"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LigacaoLerResposta"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Erro400"
          },
          "401": {
            "$ref": "#/components/responses/Erro401"
          },
          "402": {
            "$ref": "#/components/responses/Erro402"
          },
          "403": {
            "$ref": "#/components/responses/Erro403"
          },
          "404": {
            "$ref": "#/components/responses/Erro404"
          },
          "429": {
            "$ref": "#/components/responses/Erro429"
          },
          "500": {
            "$ref": "#/components/responses/Erro500"
          },
          "503": {
            "$ref": "#/components/responses/Erro503"
          },
          "default": {
            "$ref": "#/components/responses/ErroPadrao"
          }
        },
        "x-mcp-tool": "ligacao_ler",
        "x-scope": "ligacoes:ler",
        "x-read-only": true
      }
    },
    "/estoque": {
      "get": {
        "operationId": "erp_estoque",
        "summary": "View stock",
        "description": "Shows stock: the balance of each tracked product, the minimum, what ran out or is running low, cost, price, margin, the value of idle stock and the cost of goods sold this month. Amounts in Brazilian reais. Read-only.",
        "tags": [
          "business-records"
        ],
        "parameters": [
          {
            "name": "busca",
            "in": "query",
            "required": false,
            "description": "Word in the product name or code.",
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "name": "alertas",
            "in": "query",
            "required": false,
            "description": "Only what ran out, is running low or went negative.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "movimentos",
            "in": "query",
            "required": false,
            "description": "Includes the latest stock in and out movements (up to 30).",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "conta",
            "in": "query",
            "required": false,
            "description": "The account to act on, when it is not yours (partner client, another business of the same owner, admin). Empty = your own.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,64}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tool result, as JSON. With a test key, a tool that writes returns the simulation (`sandbox: true`, `simulado: true`) and nothing is saved.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "Certu-Modo": {
                "$ref": "#/components/headers/CertuModo"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErpEstoqueResposta"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Erro400"
          },
          "401": {
            "$ref": "#/components/responses/Erro401"
          },
          "402": {
            "$ref": "#/components/responses/Erro402"
          },
          "403": {
            "$ref": "#/components/responses/Erro403"
          },
          "404": {
            "$ref": "#/components/responses/Erro404"
          },
          "429": {
            "$ref": "#/components/responses/Erro429"
          },
          "500": {
            "$ref": "#/components/responses/Erro500"
          },
          "502": {
            "$ref": "#/components/responses/Erro502"
          },
          "503": {
            "$ref": "#/components/responses/Erro503"
          },
          "default": {
            "$ref": "#/components/responses/ErroPadrao"
          }
        },
        "x-mcp-tool": "erp_estoque",
        "x-scope": "erp:ler",
        "x-read-only": true
      }
    },
    "/estoque/movimentos": {
      "post": {
        "operationId": "erp_estoque_movimentar",
        "summary": "Record a stock movement",
        "description": "Records ONE stock movement and updates the balance: purchase or return (in), sale or loss (out), count adjustment (in or out) or opening balance. A positive `quantidade` goes in and a negative one goes out, and it must match the reason. Kept in the statement. Requires the ERP add-on.",
        "tags": [
          "business-records"
        ],
        "parameters": [
          {
            "name": "conta",
            "in": "query",
            "required": false,
            "description": "The account to act on, when it is not yours (partner client, another business of the same owner, admin). Empty = your own.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,64}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tool result, as JSON. With a test key, a tool that writes returns the simulation (`sandbox: true`, `simulado: true`) and nothing is saved.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "Certu-Modo": {
                "$ref": "#/components/headers/CertuModo"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErpEstoqueMovimentarResposta"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Erro400"
          },
          "401": {
            "$ref": "#/components/responses/Erro401"
          },
          "402": {
            "$ref": "#/components/responses/Erro402"
          },
          "403": {
            "$ref": "#/components/responses/Erro403"
          },
          "404": {
            "$ref": "#/components/responses/Erro404"
          },
          "409": {
            "$ref": "#/components/responses/Erro409"
          },
          "413": {
            "$ref": "#/components/responses/Erro413"
          },
          "429": {
            "$ref": "#/components/responses/Erro429"
          },
          "500": {
            "$ref": "#/components/responses/Erro500"
          },
          "502": {
            "$ref": "#/components/responses/Erro502"
          },
          "503": {
            "$ref": "#/components/responses/Erro503"
          },
          "default": {
            "$ref": "#/components/responses/ErroPadrao"
          }
        },
        "x-mcp-tool": "erp_estoque_movimentar",
        "x-scope": "erp:escrever",
        "x-read-only": false,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "produto_id",
                  "quantidade",
                  "motivo"
                ],
                "properties": {
                  "produto_id": {
                    "type": "string",
                    "pattern": "^[A-Za-z0-9_-]{1,64}$",
                    "description": "The `produtoId` from erp_estoque."
                  },
                  "quantidade": {
                    "type": "number",
                    "minimum": -100000,
                    "maximum": 100000,
                    "description": "Positive goes in, negative goes out, in the product's unit. Cannot be zero."
                  },
                  "motivo": {
                    "type": "string",
                    "enum": [
                      "compra",
                      "venda",
                      "perda",
                      "devolucao",
                      "ajuste",
                      "inicial"
                    ],
                    "description": "compra (purchase), devolucao (return) and inicial (opening balance) go in; venda (sale) and perda (loss) go out; ajuste is a count correction either way."
                  },
                  "custo_unitario": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 1000000,
                    "description": "In Brazilian reais, what ONE unit cost in this purchase. Only valid for stock coming in."
                  },
                  "observacao": {
                    "type": "string",
                    "maxLength": 300,
                    "description": "Short note, for example the supplier's invoice number."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/caixa": {
      "get": {
        "operationId": "erp_caixa",
        "summary": "View the month's cash book",
        "description": "Shows one month's cash book: money in and out (paid), money still to come in and go out (planned), the result (paid in minus paid out minus cost of goods sold), spend by category, each professional's commission and the entries. Without `mes`, the current month. Amounts in Brazilian reais. Read-only.",
        "tags": [
          "business-records"
        ],
        "parameters": [
          {
            "name": "mes",
            "in": "query",
            "required": false,
            "description": "Month in YYYY-MM format. Default: the current month.",
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-(0[1-9]|1[0-2])$"
            }
          },
          {
            "name": "limite",
            "in": "query",
            "required": false,
            "description": "How many entries to return, newest first. Default 50; 0 returns only the totals.",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 500
            }
          },
          {
            "name": "conta",
            "in": "query",
            "required": false,
            "description": "The account to act on, when it is not yours (partner client, another business of the same owner, admin). Empty = your own.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,64}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tool result, as JSON. With a test key, a tool that writes returns the simulation (`sandbox: true`, `simulado: true`) and nothing is saved.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "Certu-Modo": {
                "$ref": "#/components/headers/CertuModo"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErpCaixaResposta"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Erro400"
          },
          "401": {
            "$ref": "#/components/responses/Erro401"
          },
          "402": {
            "$ref": "#/components/responses/Erro402"
          },
          "403": {
            "$ref": "#/components/responses/Erro403"
          },
          "404": {
            "$ref": "#/components/responses/Erro404"
          },
          "429": {
            "$ref": "#/components/responses/Erro429"
          },
          "500": {
            "$ref": "#/components/responses/Erro500"
          },
          "502": {
            "$ref": "#/components/responses/Erro502"
          },
          "503": {
            "$ref": "#/components/responses/Erro503"
          },
          "default": {
            "$ref": "#/components/responses/ErroPadrao"
          }
        },
        "x-mcp-tool": "erp_caixa",
        "x-scope": "erp:ler",
        "x-read-only": true
      },
      "post": {
        "operationId": "erp_caixa_lancar",
        "summary": "Record a cash-book entry",
        "description": "Creates a cash-book entry (money in or out, paid or planned) or corrects an existing one by `id`. Amount in Brazilian reais. It only records the entry; it never moves money.",
        "tags": [
          "business-records"
        ],
        "parameters": [
          {
            "name": "conta",
            "in": "query",
            "required": false,
            "description": "The account to act on, when it is not yours (partner client, another business of the same owner, admin). Empty = your own.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,64}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tool result, as JSON. With a test key, a tool that writes returns the simulation (`sandbox: true`, `simulado: true`) and nothing is saved.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "Certu-Modo": {
                "$ref": "#/components/headers/CertuModo"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErpCaixaLancarResposta"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Erro400"
          },
          "401": {
            "$ref": "#/components/responses/Erro401"
          },
          "402": {
            "$ref": "#/components/responses/Erro402"
          },
          "403": {
            "$ref": "#/components/responses/Erro403"
          },
          "404": {
            "$ref": "#/components/responses/Erro404"
          },
          "409": {
            "$ref": "#/components/responses/Erro409"
          },
          "413": {
            "$ref": "#/components/responses/Erro413"
          },
          "429": {
            "$ref": "#/components/responses/Erro429"
          },
          "500": {
            "$ref": "#/components/responses/Erro500"
          },
          "502": {
            "$ref": "#/components/responses/Erro502"
          },
          "503": {
            "$ref": "#/components/responses/Erro503"
          },
          "default": {
            "$ref": "#/components/responses/ErroPadrao"
          }
        },
        "x-mcp-tool": "erp_caixa_lancar",
        "x-scope": "erp:escrever",
        "x-read-only": false,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "tipo",
                  "valor",
                  "descricao",
                  "dia"
                ],
                "properties": {
                  "tipo": {
                    "type": "string",
                    "enum": [
                      "entrada",
                      "saida"
                    ],
                    "description": "entrada = money in; saida = money out."
                  },
                  "valor": {
                    "type": "number",
                    "minimum": 0.01,
                    "maximum": 10000000,
                    "description": "In Brazilian reais, always positive. The type says whether it goes in or out."
                  },
                  "descricao": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 140,
                    "description": "What it was, for example \"September rent\"."
                  },
                  "dia": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                    "description": "Cash-book date, YYYY-MM-DD."
                  },
                  "situacao": {
                    "type": "string",
                    "enum": [
                      "pago",
                      "previsto"
                    ],
                    "description": "pago (paid, the default) already happened; previsto (planned) is a bill to pay or an amount to receive."
                  },
                  "categoria": {
                    "type": "string",
                    "maxLength": 60,
                    "description": "For example \"Rent\", \"Supplier\" or \"Service\". Categories already in use show up in the cash book."
                  },
                  "forma": {
                    "type": "string",
                    "maxLength": 30,
                    "description": "pix, dinheiro (cash), debito (debit), credito (credit) or outra (other)."
                  },
                  "observacao": {
                    "type": "string",
                    "maxLength": 300
                  },
                  "id": {
                    "type": "string",
                    "pattern": "^[A-Za-z0-9_-]{1,64}$",
                    "description": "Id of an entry from erp_caixa, to correct it. Without an id, a new one is created."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/caixa/resultado": {
      "get": {
        "operationId": "erp_resultado",
        "summary": "Income statement",
        "description": "The month's income statement (revenue, costs, expenses and profit, by the account's chart of accounts), the comparison with previous months and the projected balance to the end of the month, plus the categories not classified yet. Amounts in Brazilian reais. Read-only.",
        "tags": [
          "business-records"
        ],
        "parameters": [
          {
            "name": "mes",
            "in": "query",
            "required": false,
            "description": "Month of the statement, YYYY-MM. Default: the current month.",
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-(0[1-9]|1[0-2])$"
            }
          },
          {
            "name": "meses",
            "in": "query",
            "required": false,
            "description": "How many months in the comparison. Default 6.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 24
            }
          },
          {
            "name": "conta",
            "in": "query",
            "required": false,
            "description": "The account to act on, when it is not yours (partner client, another business of the same owner, admin). Empty = your own.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,64}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tool result, as JSON. With a test key, a tool that writes returns the simulation (`sandbox: true`, `simulado: true`) and nothing is saved.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "Certu-Modo": {
                "$ref": "#/components/headers/CertuModo"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErpResultadoResposta"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Erro400"
          },
          "401": {
            "$ref": "#/components/responses/Erro401"
          },
          "402": {
            "$ref": "#/components/responses/Erro402"
          },
          "403": {
            "$ref": "#/components/responses/Erro403"
          },
          "404": {
            "$ref": "#/components/responses/Erro404"
          },
          "429": {
            "$ref": "#/components/responses/Erro429"
          },
          "500": {
            "$ref": "#/components/responses/Erro500"
          },
          "502": {
            "$ref": "#/components/responses/Erro502"
          },
          "503": {
            "$ref": "#/components/responses/Erro503"
          },
          "default": {
            "$ref": "#/components/responses/ErroPadrao"
          }
        },
        "x-mcp-tool": "erp_resultado",
        "x-scope": "erp:ler",
        "x-read-only": true
      }
    },
    "/agenda": {
      "get": {
        "operationId": "agenda_listar",
        "summary": "View the calendar",
        "description": "Lists bookings (made by the WhatsApp AI, the booking link or the business) and blocked periods in a date range. Without dates, shows today through the next 7 days. Pending bookings wait for the owner to confirm. Read-only.",
        "tags": [
          "calendar"
        ],
        "parameters": [
          {
            "name": "de",
            "in": "query",
            "required": false,
            "description": "First day, YYYY-MM-DD. Default: today.",
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            }
          },
          {
            "name": "ate",
            "in": "query",
            "required": false,
            "description": "Last day, YYYY-MM-DD, included. Default: 7 days after `de`.",
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Only appointments with this status.",
            "schema": {
              "type": "string",
              "enum": [
                "pendente",
                "confirmado",
                "cancelado",
                "realizado"
              ]
            }
          },
          {
            "name": "limite",
            "in": "query",
            "required": false,
            "description": "How many appointments to return. Default 50.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "conta",
            "in": "query",
            "required": false,
            "description": "The account to act on, when it is not yours (partner client, another business of the same owner, admin). Empty = your own.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,64}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tool result, as JSON. With a test key, a tool that writes returns the simulation (`sandbox: true`, `simulado: true`) and nothing is saved.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "Certu-Modo": {
                "$ref": "#/components/headers/CertuModo"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgendaListarResposta"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Erro400"
          },
          "401": {
            "$ref": "#/components/responses/Erro401"
          },
          "402": {
            "$ref": "#/components/responses/Erro402"
          },
          "403": {
            "$ref": "#/components/responses/Erro403"
          },
          "404": {
            "$ref": "#/components/responses/Erro404"
          },
          "429": {
            "$ref": "#/components/responses/Erro429"
          },
          "500": {
            "$ref": "#/components/responses/Erro500"
          },
          "502": {
            "$ref": "#/components/responses/Erro502"
          },
          "503": {
            "$ref": "#/components/responses/Erro503"
          },
          "default": {
            "$ref": "#/components/responses/ErroPadrao"
          }
        },
        "x-mcp-tool": "agenda_listar",
        "x-scope": "agenda:ler",
        "x-read-only": true
      },
      "post": {
        "operationId": "agenda_marcar",
        "summary": "Book an appointment",
        "description": "Books an appointment, already confirmed (it enters the automatic reminders and the connected Google or Outlook calendar). Refuses a time that overlaps another booking or a blocked period. Does not notify the customer.",
        "tags": [
          "calendar"
        ],
        "parameters": [
          {
            "name": "conta",
            "in": "query",
            "required": false,
            "description": "The account to act on, when it is not yours (partner client, another business of the same owner, admin). Empty = your own.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,64}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tool result, as JSON. With a test key, a tool that writes returns the simulation (`sandbox: true`, `simulado: true`) and nothing is saved.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "Certu-Modo": {
                "$ref": "#/components/headers/CertuModo"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgendaMarcarResposta"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Erro400"
          },
          "401": {
            "$ref": "#/components/responses/Erro401"
          },
          "402": {
            "$ref": "#/components/responses/Erro402"
          },
          "403": {
            "$ref": "#/components/responses/Erro403"
          },
          "404": {
            "$ref": "#/components/responses/Erro404"
          },
          "409": {
            "$ref": "#/components/responses/Erro409"
          },
          "413": {
            "$ref": "#/components/responses/Erro413"
          },
          "429": {
            "$ref": "#/components/responses/Erro429"
          },
          "500": {
            "$ref": "#/components/responses/Erro500"
          },
          "502": {
            "$ref": "#/components/responses/Erro502"
          },
          "503": {
            "$ref": "#/components/responses/Erro503"
          },
          "default": {
            "$ref": "#/components/responses/ErroPadrao"
          }
        },
        "x-mcp-tool": "agenda_marcar",
        "x-scope": "agenda:escrever",
        "x-read-only": false,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "nome",
                  "inicio"
                ],
                "properties": {
                  "nome": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80,
                    "description": "Customer's name."
                  },
                  "inicio": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}$",
                    "description": "Day and time in the business's time zone: YYYY-MM-DDTHH:MM."
                  },
                  "telefone": {
                    "type": "string",
                    "maxLength": 20,
                    "description": "Customer's WhatsApp with country and area code. Without it, the customer gets no reminder."
                  },
                  "servico": {
                    "type": "string",
                    "maxLength": 80,
                    "description": "What will be done, for example \"Consultation\" or \"Haircut\"."
                  },
                  "duracao_min": {
                    "type": "integer",
                    "minimum": 5,
                    "maximum": 600,
                    "description": "Duration in minutes. Default 60."
                  },
                  "endereco": {
                    "type": "string",
                    "maxLength": 300,
                    "description": "Where the appointment takes place, when it is not at the business's address."
                  },
                  "ignorar_conflito": {
                    "type": "boolean",
                    "description": "true only when the owner confirmed booking over another appointment or a block."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/agenda/bloqueios": {
      "post": {
        "operationId": "agenda_bloquear",
        "summary": "Block or unblock time",
        "description": "Blocks a period of the calendar (lunch, day off, holiday, vacation) so the AI and the booking link book nothing in it, or removes a block (acao \"remover\" with the bloqueio_id shown in the calendar). Existing bookings are not touched.",
        "tags": [
          "calendar"
        ],
        "parameters": [
          {
            "name": "conta",
            "in": "query",
            "required": false,
            "description": "The account to act on, when it is not yours (partner client, another business of the same owner, admin). Empty = your own.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,64}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tool result, as JSON. With a test key, a tool that writes returns the simulation (`sandbox: true`, `simulado: true`) and nothing is saved.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "Certu-Modo": {
                "$ref": "#/components/headers/CertuModo"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BloqueioCriado"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Erro400"
          },
          "401": {
            "$ref": "#/components/responses/Erro401"
          },
          "402": {
            "$ref": "#/components/responses/Erro402"
          },
          "403": {
            "$ref": "#/components/responses/Erro403"
          },
          "404": {
            "$ref": "#/components/responses/Erro404"
          },
          "409": {
            "$ref": "#/components/responses/Erro409"
          },
          "413": {
            "$ref": "#/components/responses/Erro413"
          },
          "429": {
            "$ref": "#/components/responses/Erro429"
          },
          "500": {
            "$ref": "#/components/responses/Erro500"
          },
          "502": {
            "$ref": "#/components/responses/Erro502"
          },
          "503": {
            "$ref": "#/components/responses/Erro503"
          },
          "default": {
            "$ref": "#/components/responses/ErroPadrao"
          }
        },
        "x-mcp-tool": "agenda_bloquear",
        "x-scope": "agenda:escrever",
        "x-read-only": false,
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "dia": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                    "description": "Day of the block, YYYY-MM-DD. Required to block."
                  },
                  "das": {
                    "type": "string",
                    "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
                    "description": "Start time, HH:MM. Required to block."
                  },
                  "ate": {
                    "type": "string",
                    "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
                    "description": "End time, HH:MM. Required to block."
                  },
                  "motivo": {
                    "type": "string",
                    "maxLength": 120,
                    "description": "For example \"Lunch\" or \"Holiday\"."
                  },
                  "bloqueio_id": {
                    "type": "string",
                    "maxLength": 80,
                    "description": "The `id` of the block, to remove it."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/agenda/bloqueios/{bloqueio_id}": {
      "delete": {
        "operationId": "agenda_bloqueio_remover",
        "summary": "Block or unblock time (removes a block)",
        "description": "Blocks a period of the calendar (lunch, day off, holiday, vacation) so the AI and the booking link book nothing in it, or removes a block (acao \"remover\" with the bloqueio_id shown in the calendar). Existing bookings are not touched.",
        "tags": [
          "calendar"
        ],
        "parameters": [
          {
            "name": "bloqueio_id",
            "in": "path",
            "required": true,
            "description": "The `id` of the block, to remove it.",
            "schema": {
              "type": "string",
              "maxLength": 80
            }
          },
          {
            "name": "conta",
            "in": "query",
            "required": false,
            "description": "The account to act on, when it is not yours (partner client, another business of the same owner, admin). Empty = your own.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,64}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tool result, as JSON. With a test key, a tool that writes returns the simulation (`sandbox: true`, `simulado: true`) and nothing is saved.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "Certu-Modo": {
                "$ref": "#/components/headers/CertuModo"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BloqueioRemovido"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Erro400"
          },
          "401": {
            "$ref": "#/components/responses/Erro401"
          },
          "402": {
            "$ref": "#/components/responses/Erro402"
          },
          "403": {
            "$ref": "#/components/responses/Erro403"
          },
          "404": {
            "$ref": "#/components/responses/Erro404"
          },
          "409": {
            "$ref": "#/components/responses/Erro409"
          },
          "429": {
            "$ref": "#/components/responses/Erro429"
          },
          "500": {
            "$ref": "#/components/responses/Erro500"
          },
          "502": {
            "$ref": "#/components/responses/Erro502"
          },
          "503": {
            "$ref": "#/components/responses/Erro503"
          },
          "default": {
            "$ref": "#/components/responses/ErroPadrao"
          }
        },
        "x-mcp-tool": "agenda_bloquear",
        "x-scope": "agenda:escrever",
        "x-read-only": false
      }
    },
    "/agenda/{id}/remarcar": {
      "post": {
        "operationId": "agenda_remarcar",
        "summary": "Reschedule an appointment",
        "description": "Changes the day and time of a booking (and the duration, if sent). The booking stays confirmed and reminders restart. Refuses a time that is taken. Does not notify the customer.",
        "tags": [
          "calendar"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The `id` returned by agenda_listar.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,64}$"
            }
          },
          {
            "name": "conta",
            "in": "query",
            "required": false,
            "description": "The account to act on, when it is not yours (partner client, another business of the same owner, admin). Empty = your own.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,64}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tool result, as JSON. With a test key, a tool that writes returns the simulation (`sandbox: true`, `simulado: true`) and nothing is saved.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "Certu-Modo": {
                "$ref": "#/components/headers/CertuModo"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgendaRemarcarResposta"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Erro400"
          },
          "401": {
            "$ref": "#/components/responses/Erro401"
          },
          "402": {
            "$ref": "#/components/responses/Erro402"
          },
          "403": {
            "$ref": "#/components/responses/Erro403"
          },
          "404": {
            "$ref": "#/components/responses/Erro404"
          },
          "409": {
            "$ref": "#/components/responses/Erro409"
          },
          "413": {
            "$ref": "#/components/responses/Erro413"
          },
          "429": {
            "$ref": "#/components/responses/Erro429"
          },
          "500": {
            "$ref": "#/components/responses/Erro500"
          },
          "502": {
            "$ref": "#/components/responses/Erro502"
          },
          "503": {
            "$ref": "#/components/responses/Erro503"
          },
          "default": {
            "$ref": "#/components/responses/ErroPadrao"
          }
        },
        "x-mcp-tool": "agenda_remarcar",
        "x-scope": "agenda:escrever",
        "x-read-only": false,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "inicio"
                ],
                "properties": {
                  "inicio": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}$",
                    "description": "New day and time: YYYY-MM-DDTHH:MM."
                  },
                  "duracao_min": {
                    "type": "integer",
                    "minimum": 5,
                    "maximum": 600,
                    "description": "New duration in minutes. Without it, the current one stays."
                  },
                  "ignorar_conflito": {
                    "type": "boolean",
                    "description": "true only when the owner confirmed rescheduling over another appointment or a block."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/agenda/{id}/confirmar": {
      "post": {
        "operationId": "agenda_confirmar",
        "summary": "Confirm a pending appointment",
        "description": "Confirms a booking the AI left pending (when it does not book on its own). Once confirmed, it enters the automatic reminders. Does not notify the customer.",
        "tags": [
          "calendar"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The `id` returned by agenda_listar.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,64}$"
            }
          },
          {
            "name": "conta",
            "in": "query",
            "required": false,
            "description": "The account to act on, when it is not yours (partner client, another business of the same owner, admin). Empty = your own.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,64}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tool result, as JSON. With a test key, a tool that writes returns the simulation (`sandbox: true`, `simulado: true`) and nothing is saved.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "Certu-Modo": {
                "$ref": "#/components/headers/CertuModo"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgendaConfirmarResposta"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Erro400"
          },
          "401": {
            "$ref": "#/components/responses/Erro401"
          },
          "402": {
            "$ref": "#/components/responses/Erro402"
          },
          "403": {
            "$ref": "#/components/responses/Erro403"
          },
          "404": {
            "$ref": "#/components/responses/Erro404"
          },
          "409": {
            "$ref": "#/components/responses/Erro409"
          },
          "429": {
            "$ref": "#/components/responses/Erro429"
          },
          "500": {
            "$ref": "#/components/responses/Erro500"
          },
          "502": {
            "$ref": "#/components/responses/Erro502"
          },
          "503": {
            "$ref": "#/components/responses/Erro503"
          },
          "default": {
            "$ref": "#/components/responses/ErroPadrao"
          }
        },
        "x-mcp-tool": "agenda_confirmar",
        "x-scope": "agenda:escrever",
        "x-read-only": false
      }
    },
    "/agenda/{id}/cancelar": {
      "post": {
        "operationId": "agenda_cancelar",
        "summary": "Cancel an appointment",
        "description": "Cancels a booking and frees the time. Does not notify the customer; the owner does that in the app.",
        "tags": [
          "calendar"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The `id` returned by agenda_listar.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,64}$"
            }
          },
          {
            "name": "conta",
            "in": "query",
            "required": false,
            "description": "The account to act on, when it is not yours (partner client, another business of the same owner, admin). Empty = your own.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,64}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tool result, as JSON. With a test key, a tool that writes returns the simulation (`sandbox: true`, `simulado: true`) and nothing is saved.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "Certu-Modo": {
                "$ref": "#/components/headers/CertuModo"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgendaCancelarResposta"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Erro400"
          },
          "401": {
            "$ref": "#/components/responses/Erro401"
          },
          "402": {
            "$ref": "#/components/responses/Erro402"
          },
          "403": {
            "$ref": "#/components/responses/Erro403"
          },
          "404": {
            "$ref": "#/components/responses/Erro404"
          },
          "409": {
            "$ref": "#/components/responses/Erro409"
          },
          "429": {
            "$ref": "#/components/responses/Erro429"
          },
          "500": {
            "$ref": "#/components/responses/Erro500"
          },
          "502": {
            "$ref": "#/components/responses/Erro502"
          },
          "503": {
            "$ref": "#/components/responses/Erro503"
          },
          "default": {
            "$ref": "#/components/responses/ErroPadrao"
          }
        },
        "x-mcp-tool": "agenda_cancelar",
        "x-scope": "agenda:escrever",
        "x-read-only": false
      }
    },
    "/pedidos": {
      "get": {
        "operationId": "pedidos_listar",
        "summary": "List orders and work orders",
        "description": "Lists the account's orders, work orders and quotes, newest first, with customer, stage, total, items and whether it was paid. Also returns the board stages (each with its `etapaId`) and how many orders sit in each. Values in Brazilian reais. Read-only.",
        "tags": [
          "business-records"
        ],
        "parameters": [
          {
            "name": "busca",
            "in": "query",
            "required": false,
            "description": "Customer name or phone, order number or a word in the items.",
            "schema": {
              "type": "string",
              "maxLength": 100
            }
          },
          {
            "name": "etapa",
            "in": "query",
            "required": false,
            "description": "Only orders in this stage (the `etapaId`).",
            "schema": {
              "type": "string",
              "maxLength": 60
            }
          },
          {
            "name": "abertos",
            "in": "query",
            "required": false,
            "description": "Only what has not been delivered or cancelled yet.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "tipo",
            "in": "query",
            "required": false,
            "description": "Only orders, only work orders or only quotes.",
            "schema": {
              "type": "string",
              "enum": [
                "pedido",
                "os",
                "orcamento"
              ]
            }
          },
          {
            "name": "limite",
            "in": "query",
            "required": false,
            "description": "How many orders to return. Default 30.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "conta",
            "in": "query",
            "required": false,
            "description": "The account to act on, when it is not yours (partner client, another business of the same owner, admin). Empty = your own.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,64}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tool result, as JSON. With a test key, a tool that writes returns the simulation (`sandbox: true`, `simulado: true`) and nothing is saved.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "Certu-Modo": {
                "$ref": "#/components/headers/CertuModo"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PedidosListarResposta"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Erro400"
          },
          "401": {
            "$ref": "#/components/responses/Erro401"
          },
          "402": {
            "$ref": "#/components/responses/Erro402"
          },
          "403": {
            "$ref": "#/components/responses/Erro403"
          },
          "404": {
            "$ref": "#/components/responses/Erro404"
          },
          "429": {
            "$ref": "#/components/responses/Erro429"
          },
          "500": {
            "$ref": "#/components/responses/Erro500"
          },
          "502": {
            "$ref": "#/components/responses/Erro502"
          },
          "503": {
            "$ref": "#/components/responses/Erro503"
          },
          "default": {
            "$ref": "#/components/responses/ErroPadrao"
          }
        },
        "x-mcp-tool": "pedidos_listar",
        "x-scope": "erp:ler",
        "x-read-only": true
      },
      "post": {
        "operationId": "pedido_criar",
        "summary": "Create an order or work order",
        "description": "Creates an order, work order or quote with a customer and items (product, part or service, priced in Brazilian reais), in the first stage of the board. It does not notify the customer or create a link: the owner sends that from the app. When the first stage is the one that takes items out of inventory, inventory goes down too. Writes to the account; meant to run only after the owner confirms. Requires the ERP add-on.",
        "tags": [
          "business-records"
        ],
        "parameters": [
          {
            "name": "conta",
            "in": "query",
            "required": false,
            "description": "The account to act on, when it is not yours (partner client, another business of the same owner, admin). Empty = your own.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,64}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tool result, as JSON. With a test key, a tool that writes returns the simulation (`sandbox: true`, `simulado: true`) and nothing is saved.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "Certu-Modo": {
                "$ref": "#/components/headers/CertuModo"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PedidoCriarResposta"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Erro400"
          },
          "401": {
            "$ref": "#/components/responses/Erro401"
          },
          "402": {
            "$ref": "#/components/responses/Erro402"
          },
          "403": {
            "$ref": "#/components/responses/Erro403"
          },
          "404": {
            "$ref": "#/components/responses/Erro404"
          },
          "409": {
            "$ref": "#/components/responses/Erro409"
          },
          "413": {
            "$ref": "#/components/responses/Erro413"
          },
          "429": {
            "$ref": "#/components/responses/Erro429"
          },
          "500": {
            "$ref": "#/components/responses/Erro500"
          },
          "502": {
            "$ref": "#/components/responses/Erro502"
          },
          "503": {
            "$ref": "#/components/responses/Erro503"
          },
          "default": {
            "$ref": "#/components/responses/ErroPadrao"
          }
        },
        "x-mcp-tool": "pedido_criar",
        "x-scope": "erp:escrever",
        "x-read-only": false,
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "cliente_nome": {
                    "type": "string",
                    "maxLength": 120,
                    "description": "Customer's name."
                  },
                  "cliente_telefone": {
                    "type": "string",
                    "maxLength": 20,
                    "description": "Customer's WhatsApp number with area code. Either the name or the phone is required."
                  },
                  "contato_id": {
                    "type": "string",
                    "pattern": "^[A-Za-z0-9_-]{1,128}$",
                    "description": "The contact `id` from crm_contatos, when the customer is already in the CRM."
                  },
                  "tipo": {
                    "type": "string",
                    "enum": [
                      "pedido",
                      "os",
                      "orcamento"
                    ],
                    "description": "pedido (sale, delivery), os (service, repair) or orcamento (quote waiting for the customer's approval). Default: the one that matches how the account works."
                  },
                  "itens": {
                    "type": "array",
                    "maxItems": 80,
                    "description": "What was ordered or quoted.",
                    "items": {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "descricao"
                      ],
                      "properties": {
                        "descricao": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 160,
                          "description": "The item the way the customer reads it, for example \"Oil change\" or \"13 kg gas cylinder\"."
                        },
                        "quantidade": {
                          "type": "number",
                          "minimum": 0.001,
                          "maximum": 100000,
                          "description": "Quantity. Default 1."
                        },
                        "preco": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 10000000,
                          "description": "Price of ONE unit, in Brazilian reais."
                        },
                        "tipo": {
                          "type": "string",
                          "enum": [
                            "produto",
                            "peca",
                            "servico"
                          ],
                          "description": "produto and peca (part) move inventory (with `produto_id`); servico is labor. Default produto."
                        },
                        "produto_id": {
                          "type": "string",
                          "pattern": "^[A-Za-z0-9_-]{1,128}$",
                          "description": "The `produtoId` from erp_estoque, so the right product leaves inventory. Without it, the item does not touch inventory."
                        },
                        "desconto": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 10000000,
                          "description": "Discount on the whole line, in Brazilian reais."
                        }
                      }
                    }
                  },
                  "desconto": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 10000000,
                    "description": "Discount on the whole order, in Brazilian reais, on top of each item discount."
                  },
                  "taxa": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 10000000,
                    "description": "Delivery or travel fee, in Brazilian reais."
                  },
                  "endereco": {
                    "type": "string",
                    "maxLength": 300,
                    "description": "Delivery or service address."
                  },
                  "forma_pagamento": {
                    "type": "string",
                    "maxLength": 60,
                    "description": "How the customer will pay, for example \"pix\" or \"dinheiro\" (cash)."
                  },
                  "previsao": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}(T\\d{2}:\\d{2})?$",
                    "description": "Expected ready or delivery date: YYYY-MM-DD or YYYY-MM-DDTHH:MM."
                  },
                  "observacao_cliente": {
                    "type": "string",
                    "maxLength": 1000,
                    "description": "What the customer reads on the approval and tracking pages."
                  },
                  "notas": {
                    "type": "string",
                    "maxLength": 1000,
                    "description": "Internal note. Never shown to the customer."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/pedidos/{id}": {
      "get": {
        "operationId": "pedido_ler",
        "summary": "Read an order or work order",
        "description": "One full order, work order or quote, by `id` or by number: items with price and discount, totals, stage, customer, address, due date, the customer approval, the linked charge, the approval and tracking links (when the owner already created them) and the history. Values in Brazilian reais. Read-only.",
        "tags": [
          "business-records"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The `id` returned by pedidos_listar.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,128}$"
            }
          },
          {
            "name": "conta",
            "in": "query",
            "required": false,
            "description": "The account to act on, when it is not yours (partner client, another business of the same owner, admin). Empty = your own.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,64}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tool result, as JSON. With a test key, a tool that writes returns the simulation (`sandbox: true`, `simulado: true`) and nothing is saved.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "Certu-Modo": {
                "$ref": "#/components/headers/CertuModo"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PedidoLerResposta"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Erro400"
          },
          "401": {
            "$ref": "#/components/responses/Erro401"
          },
          "402": {
            "$ref": "#/components/responses/Erro402"
          },
          "403": {
            "$ref": "#/components/responses/Erro403"
          },
          "404": {
            "$ref": "#/components/responses/Erro404"
          },
          "429": {
            "$ref": "#/components/responses/Erro429"
          },
          "500": {
            "$ref": "#/components/responses/Erro500"
          },
          "502": {
            "$ref": "#/components/responses/Erro502"
          },
          "503": {
            "$ref": "#/components/responses/Erro503"
          },
          "default": {
            "$ref": "#/components/responses/ErroPadrao"
          }
        },
        "x-mcp-tool": "pedido_ler",
        "x-scope": "erp:ler",
        "x-read-only": true
      }
    },
    "/pedidos/{id}/etapa": {
      "post": {
        "operationId": "pedido_mudar_etapa",
        "summary": "Change the stage of an order",
        "description": "Moves an order or work order to another stage of the board (for example from \"In progress\" to \"Ready\"), by `etapaId`. It goes into the history. Depending on the account settings, the new stage takes items out of inventory or puts them back. It sends no messages: the customer only sees the new stage on the tracking link. Writes to the account; meant to run only after the owner confirms. Requires the ERP add-on.",
        "tags": [
          "business-records"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The `id` returned by pedidos_listar.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,128}$"
            }
          },
          {
            "name": "conta",
            "in": "query",
            "required": false,
            "description": "The account to act on, when it is not yours (partner client, another business of the same owner, admin). Empty = your own.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,64}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tool result, as JSON. With a test key, a tool that writes returns the simulation (`sandbox: true`, `simulado: true`) and nothing is saved.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "Certu-Modo": {
                "$ref": "#/components/headers/CertuModo"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PedidoMudarEtapaResposta"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Erro400"
          },
          "401": {
            "$ref": "#/components/responses/Erro401"
          },
          "402": {
            "$ref": "#/components/responses/Erro402"
          },
          "403": {
            "$ref": "#/components/responses/Erro403"
          },
          "404": {
            "$ref": "#/components/responses/Erro404"
          },
          "409": {
            "$ref": "#/components/responses/Erro409"
          },
          "413": {
            "$ref": "#/components/responses/Erro413"
          },
          "429": {
            "$ref": "#/components/responses/Erro429"
          },
          "500": {
            "$ref": "#/components/responses/Erro500"
          },
          "502": {
            "$ref": "#/components/responses/Erro502"
          },
          "503": {
            "$ref": "#/components/responses/Erro503"
          },
          "default": {
            "$ref": "#/components/responses/ErroPadrao"
          }
        },
        "x-mcp-tool": "pedido_mudar_etapa",
        "x-scope": "erp:escrever",
        "x-read-only": false,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "etapa"
                ],
                "properties": {
                  "etapa": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 60,
                    "description": "The `etapaId` of the new stage, from the `etapas` list of pedidos_listar."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/cobrancas": {
      "get": {
        "operationId": "cobrancas_listar",
        "summary": "List charges",
        "description": "Lists the account's charges (Pix, bank slip, card or payment link), newest first, with customer, amount, due date, status (pendente, paga, vencida, estornada, cancelada), the payment link and whether it was sent to the customer. Also says whether the payment account is open and approved. Values in Brazilian reais. Read-only.",
        "tags": [
          "payment-requests"
        ],
        "parameters": [
          {
            "name": "situacao",
            "in": "query",
            "required": false,
            "description": "Only charges in this status.",
            "schema": {
              "type": "string",
              "enum": [
                "pendente",
                "paga",
                "vencida",
                "estornada",
                "cancelada"
              ]
            }
          },
          {
            "name": "busca",
            "in": "query",
            "required": false,
            "description": "Customer name or phone, or a word in the description.",
            "schema": {
              "type": "string",
              "maxLength": 100
            }
          },
          {
            "name": "limite",
            "in": "query",
            "required": false,
            "description": "How many charges to return. Default 50.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "conta",
            "in": "query",
            "required": false,
            "description": "The account to act on, when it is not yours (partner client, another business of the same owner, admin). Empty = your own.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,64}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tool result, as JSON. With a test key, a tool that writes returns the simulation (`sandbox: true`, `simulado: true`) and nothing is saved.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "Certu-Modo": {
                "$ref": "#/components/headers/CertuModo"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CobrancasListarResposta"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Erro400"
          },
          "401": {
            "$ref": "#/components/responses/Erro401"
          },
          "402": {
            "$ref": "#/components/responses/Erro402"
          },
          "403": {
            "$ref": "#/components/responses/Erro403"
          },
          "404": {
            "$ref": "#/components/responses/Erro404"
          },
          "429": {
            "$ref": "#/components/responses/Erro429"
          },
          "500": {
            "$ref": "#/components/responses/Erro500"
          },
          "502": {
            "$ref": "#/components/responses/Erro502"
          },
          "503": {
            "$ref": "#/components/responses/Erro503"
          },
          "default": {
            "$ref": "#/components/responses/ErroPadrao"
          }
        },
        "x-mcp-tool": "cobrancas_listar",
        "x-scope": "cobrancas:ler",
        "x-read-only": true
      },
      "post": {
        "operationId": "cobranca_criar",
        "summary": "Create a charge",
        "description": "Creates ONE charge (payment link, Pix, bank slip or card) in the account's payment account and returns the link and the Pix copy-and-paste code. It sends NOTHING to the customer: the owner sends the link over WhatsApp or from the Charges screen. With `pedido_id`, it charges the order total and links the charge to the order: when the customer pays, the order is marked paid automatically. The same charge requested again (same order, or same customer, amount, description and due date) returns the existing one instead of creating another. It does not move money. Writes to the account; meant to run only after the owner confirms.",
        "tags": [
          "payment-requests"
        ],
        "parameters": [
          {
            "name": "conta",
            "in": "query",
            "required": false,
            "description": "The account to act on, when it is not yours (partner client, another business of the same owner, admin). Empty = your own.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,64}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tool result, as JSON. With a test key, a tool that writes returns the simulation (`sandbox: true`, `simulado: true`) and nothing is saved.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "Certu-Modo": {
                "$ref": "#/components/headers/CertuModo"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CobrancaCriarResposta"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Erro400"
          },
          "401": {
            "$ref": "#/components/responses/Erro401"
          },
          "402": {
            "$ref": "#/components/responses/Erro402"
          },
          "403": {
            "$ref": "#/components/responses/Erro403"
          },
          "404": {
            "$ref": "#/components/responses/Erro404"
          },
          "409": {
            "$ref": "#/components/responses/Erro409"
          },
          "413": {
            "$ref": "#/components/responses/Erro413"
          },
          "429": {
            "$ref": "#/components/responses/Erro429"
          },
          "500": {
            "$ref": "#/components/responses/Erro500"
          },
          "502": {
            "$ref": "#/components/responses/Erro502"
          },
          "503": {
            "$ref": "#/components/responses/Erro503"
          },
          "default": {
            "$ref": "#/components/responses/ErroPadrao"
          }
        },
        "x-mcp-tool": "cobranca_criar",
        "x-scope": "cobrancas:escrever",
        "x-read-only": false,
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "pedido_id": {
                    "type": "string",
                    "pattern": "^[A-Za-z0-9_-]{1,128}$",
                    "description": "The `id` of an order from pedidos_listar. Charges its total, in its customer's name."
                  },
                  "valor": {
                    "type": "number",
                    "minimum": 5,
                    "maximum": 100000,
                    "description": "In Brazilian reais, from 5 to 100,000. Required without `pedido_id`."
                  },
                  "descricao": {
                    "type": "string",
                    "maxLength": 140,
                    "description": "What is being charged, the way the customer reads it. Required without `pedido_id`."
                  },
                  "vencimento": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                    "description": "Due date, YYYY-MM-DD. Default: today."
                  },
                  "metodo": {
                    "type": "string",
                    "enum": [
                      "link",
                      "pix",
                      "boleto",
                      "cartao"
                    ],
                    "description": "link (the customer picks how to pay, default), pix, boleto (bank slip, needs a CPF or CNPJ) or cartao (card)."
                  },
                  "cliente_nome": {
                    "type": "string",
                    "maxLength": 80,
                    "description": "Customer's name."
                  },
                  "cliente_telefone": {
                    "type": "string",
                    "maxLength": 20,
                    "description": "Customer's WhatsApp number with area code. Either the name or the phone is required."
                  },
                  "contato_id": {
                    "type": "string",
                    "pattern": "^[A-Za-z0-9_-]{1,128}$",
                    "description": "The contact `id` from crm_contatos, when the customer is already in the CRM."
                  },
                  "cpf_cnpj": {
                    "type": "string",
                    "maxLength": 20,
                    "description": "The payer's CPF or CNPJ (Brazilian tax id). Required for boleto."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/retornos": {
      "get": {
        "operationId": "retornos_listar",
        "summary": "List recall reminders",
        "description": "Lists the come-back reminders (vaccine, 6-month cleaning, oil change, gas running out, customer gone quiet) created by the active playbooks: who, why, when it goes out, whether it went out, whether the customer replied, booked or came back, and the revenue recovered. Pending ones go out on their own through the account routine, within the sending hours, opt-out and daily cap. Values in Brazilian reais. Read-only.",
        "tags": [
          "crm"
        ],
        "parameters": [
          {
            "name": "situacao",
            "in": "query",
            "required": false,
            "description": "Only recalls in this status.",
            "schema": {
              "type": "string",
              "enum": [
                "pendente",
                "enviado",
                "agendado",
                "convertido",
                "dispensado"
              ]
            }
          },
          {
            "name": "roteiro",
            "in": "query",
            "required": false,
            "description": "Only recalls from this playbook (the `id` from retorno_roteiros).",
            "schema": {
              "type": "string",
              "maxLength": 60
            }
          },
          {
            "name": "busca",
            "in": "query",
            "required": false,
            "description": "Customer name or phone.",
            "schema": {
              "type": "string",
              "maxLength": 100
            }
          },
          {
            "name": "limite",
            "in": "query",
            "required": false,
            "description": "How many recalls to return. Default 50.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "conta",
            "in": "query",
            "required": false,
            "description": "The account to act on, when it is not yours (partner client, another business of the same owner, admin). Empty = your own.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,64}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tool result, as JSON. With a test key, a tool that writes returns the simulation (`sandbox: true`, `simulado: true`) and nothing is saved.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "Certu-Modo": {
                "$ref": "#/components/headers/CertuModo"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RetornosListarResposta"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Erro400"
          },
          "401": {
            "$ref": "#/components/responses/Erro401"
          },
          "402": {
            "$ref": "#/components/responses/Erro402"
          },
          "403": {
            "$ref": "#/components/responses/Erro403"
          },
          "404": {
            "$ref": "#/components/responses/Erro404"
          },
          "429": {
            "$ref": "#/components/responses/Erro429"
          },
          "500": {
            "$ref": "#/components/responses/Erro500"
          },
          "502": {
            "$ref": "#/components/responses/Erro502"
          },
          "503": {
            "$ref": "#/components/responses/Erro503"
          },
          "default": {
            "$ref": "#/components/responses/ErroPadrao"
          }
        },
        "x-mcp-tool": "retornos_listar",
        "x-scope": "crm:ler",
        "x-read-only": true
      }
    },
    "/retornos/roteiros": {
      "get": {
        "operationId": "retorno_roteiros",
        "summary": "Recall playbooks",
        "description": "Lists the ready-made recall playbooks by business type (veterinary, clinic, auto shop, gas and water, real estate and general), with what each one does, the interval, the message and whether it is on in this account, plus the ones recommended for the account. With `roteiro_id`, it shows the preview: how many customers would be reminded in the next 7 days if the playbook were on, a few examples and the ready message. It turns nothing on: turning a playbook on makes the account remind customers by itself, and the owner does that in the app. Read-only.",
        "tags": [
          "crm"
        ],
        "parameters": [
          {
            "name": "nicho",
            "in": "query",
            "required": false,
            "description": "Only playbooks for this business type.",
            "schema": {
              "type": "string",
              "enum": [
                "vet",
                "clinica",
                "auto",
                "gas",
                "imobiliaria",
                "geral"
              ]
            }
          },
          {
            "name": "ligados",
            "in": "query",
            "required": false,
            "description": "Only the playbooks turned on in this account.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "conta",
            "in": "query",
            "required": false,
            "description": "The account to act on, when it is not yours (partner client, another business of the same owner, admin). Empty = your own.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,64}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tool result, as JSON. With a test key, a tool that writes returns the simulation (`sandbox: true`, `simulado: true`) and nothing is saved.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "Certu-Modo": {
                "$ref": "#/components/headers/CertuModo"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RetornoRoteirosResposta"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Erro400"
          },
          "401": {
            "$ref": "#/components/responses/Erro401"
          },
          "402": {
            "$ref": "#/components/responses/Erro402"
          },
          "403": {
            "$ref": "#/components/responses/Erro403"
          },
          "404": {
            "$ref": "#/components/responses/Erro404"
          },
          "429": {
            "$ref": "#/components/responses/Erro429"
          },
          "500": {
            "$ref": "#/components/responses/Erro500"
          },
          "502": {
            "$ref": "#/components/responses/Erro502"
          },
          "503": {
            "$ref": "#/components/responses/Erro503"
          },
          "default": {
            "$ref": "#/components/responses/ErroPadrao"
          }
        },
        "x-mcp-tool": "retorno_roteiros",
        "x-scope": "crm:ler",
        "x-read-only": true
      }
    },
    "/retornos/roteiros/{roteiro_id}": {
      "get": {
        "operationId": "retorno_roteiro_ler",
        "summary": "Recall playbooks (one sequence by id)",
        "description": "Lists the ready-made recall playbooks by business type (veterinary, clinic, auto shop, gas and water, real estate and general), with what each one does, the interval, the message and whether it is on in this account, plus the ones recommended for the account. With `roteiro_id`, it shows the preview: how many customers would be reminded in the next 7 days if the playbook were on, a few examples and the ready message. It turns nothing on: turning a playbook on makes the account remind customers by itself, and the owner does that in the app. Read-only.",
        "tags": [
          "crm"
        ],
        "parameters": [
          {
            "name": "roteiro_id",
            "in": "path",
            "required": true,
            "description": "The `id` of a playbook, to preview who would be reminded.",
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9_]{1,60}$"
            }
          },
          {
            "name": "nicho",
            "in": "query",
            "required": false,
            "description": "Only playbooks for this business type.",
            "schema": {
              "type": "string",
              "enum": [
                "vet",
                "clinica",
                "auto",
                "gas",
                "imobiliaria",
                "geral"
              ]
            }
          },
          {
            "name": "ligados",
            "in": "query",
            "required": false,
            "description": "Only the playbooks turned on in this account.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "conta",
            "in": "query",
            "required": false,
            "description": "The account to act on, when it is not yours (partner client, another business of the same owner, admin). Empty = your own.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,64}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tool result, as JSON. With a test key, a tool that writes returns the simulation (`sandbox: true`, `simulado: true`) and nothing is saved.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "Certu-Modo": {
                "$ref": "#/components/headers/CertuModo"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RetornoRoteirosResposta"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Erro400"
          },
          "401": {
            "$ref": "#/components/responses/Erro401"
          },
          "402": {
            "$ref": "#/components/responses/Erro402"
          },
          "403": {
            "$ref": "#/components/responses/Erro403"
          },
          "404": {
            "$ref": "#/components/responses/Erro404"
          },
          "429": {
            "$ref": "#/components/responses/Erro429"
          },
          "500": {
            "$ref": "#/components/responses/Erro500"
          },
          "502": {
            "$ref": "#/components/responses/Erro502"
          },
          "503": {
            "$ref": "#/components/responses/Erro503"
          },
          "default": {
            "$ref": "#/components/responses/ErroPadrao"
          }
        },
        "x-mcp-tool": "retorno_roteiros",
        "x-scope": "crm:ler",
        "x-read-only": true
      }
    },
    "/comissoes": {
      "get": {
        "operationId": "comissoes_resumo",
        "summary": "Commissions for the month",
        "description": "The commission and payout report for a month: each professional's base, commission, what was paid and what is still owed, the payouts made and what earned no commission (no professional, no rule, waiting for payment or completion). With `linhas`, each appointment or sale that earned a commission. Without `mes`, the current month. Values in Brazilian reais. Read-only.",
        "tags": [
          "business-records"
        ],
        "parameters": [
          {
            "name": "mes",
            "in": "query",
            "required": false,
            "description": "Month in YYYY-MM format. Default: the current month.",
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-(0[1-9]|1[0-2])$"
            }
          },
          {
            "name": "profissional",
            "in": "query",
            "required": false,
            "description": "Only this professional (the `staffId` from the list of professionals).",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,128}$"
            }
          },
          {
            "name": "linhas",
            "in": "query",
            "required": false,
            "description": "Includes each appointment or sale that earned a commission (up to 200).",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "conta",
            "in": "query",
            "required": false,
            "description": "The account to act on, when it is not yours (partner client, another business of the same owner, admin). Empty = your own.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,64}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tool result, as JSON. With a test key, a tool that writes returns the simulation (`sandbox: true`, `simulado: true`) and nothing is saved.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "Certu-Modo": {
                "$ref": "#/components/headers/CertuModo"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ComissoesResumoResposta"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Erro400"
          },
          "401": {
            "$ref": "#/components/responses/Erro401"
          },
          "402": {
            "$ref": "#/components/responses/Erro402"
          },
          "403": {
            "$ref": "#/components/responses/Erro403"
          },
          "404": {
            "$ref": "#/components/responses/Erro404"
          },
          "429": {
            "$ref": "#/components/responses/Erro429"
          },
          "500": {
            "$ref": "#/components/responses/Erro500"
          },
          "502": {
            "$ref": "#/components/responses/Erro502"
          },
          "503": {
            "$ref": "#/components/responses/Erro503"
          },
          "default": {
            "$ref": "#/components/responses/ErroPadrao"
          }
        },
        "x-mcp-tool": "comissoes_resumo",
        "x-scope": "erp:ler",
        "x-read-only": true
      }
    },
    "/pets": {
      "get": {
        "operationId": "pets_listar",
        "summary": "List pets",
        "description": "Lists the pets recorded on the CRM customers (the pet card and the pets imported from a spreadsheet), with each owner's name, phone and `contatoId`, and flags the ones that passed away. Searches by pet name, owner name or phone. Looks at the 1,500 most recent contacts. Read-only.",
        "tags": [
          "pets"
        ],
        "parameters": [
          {
            "name": "busca",
            "in": "query",
            "required": false,
            "description": "Pet or owner's name, or phone (4 digits or more).",
            "schema": {
              "type": "string",
              "maxLength": 100
            }
          },
          {
            "name": "limite",
            "in": "query",
            "required": false,
            "description": "How many pet owners to return. Default 50.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "conta",
            "in": "query",
            "required": false,
            "description": "The account to act on, when it is not yours (partner client, another business of the same owner, admin). Empty = your own.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,64}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tool result, as JSON. With a test key, a tool that writes returns the simulation (`sandbox: true`, `simulado: true`) and nothing is saved.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "Certu-Modo": {
                "$ref": "#/components/headers/CertuModo"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PetsListarResposta"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Erro400"
          },
          "401": {
            "$ref": "#/components/responses/Erro401"
          },
          "402": {
            "$ref": "#/components/responses/Erro402"
          },
          "403": {
            "$ref": "#/components/responses/Erro403"
          },
          "404": {
            "$ref": "#/components/responses/Erro404"
          },
          "429": {
            "$ref": "#/components/responses/Erro429"
          },
          "500": {
            "$ref": "#/components/responses/Erro500"
          },
          "503": {
            "$ref": "#/components/responses/Erro503"
          },
          "default": {
            "$ref": "#/components/responses/ErroPadrao"
          }
        },
        "x-mcp-tool": "pets_listar",
        "x-scope": "pets:ler",
        "x-read-only": true
      }
    },
    "/pets/vacinas": {
      "get": {
        "operationId": "pet_vacinas_proximas",
        "summary": "Upcoming pet vaccines",
        "description": "The next vaccine, dewormer and parasite treatment doses of every pet in the account, most overdue first, with the pet, the owner, the phone and the due date, within a window of days. Skips pets that passed away and deleted customers. Notifies nobody. Read-only.",
        "tags": [
          "pets"
        ],
        "parameters": [
          {
            "name": "dias",
            "in": "query",
            "required": false,
            "description": "Doses due within the next this many days. Default 30.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 365
            }
          },
          {
            "name": "atrasadas",
            "in": "query",
            "required": false,
            "description": "Includes doses that are already overdue. Default true.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "tipo",
            "in": "query",
            "required": false,
            "description": "Only doses of this type.",
            "schema": {
              "type": "string",
              "enum": [
                "vacina",
                "vermifugo",
                "antiparasitario"
              ]
            }
          },
          {
            "name": "limite",
            "in": "query",
            "required": false,
            "description": "How many doses to return. Default 100.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 300
            }
          },
          {
            "name": "conta",
            "in": "query",
            "required": false,
            "description": "The account to act on, when it is not yours (partner client, another business of the same owner, admin). Empty = your own.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,64}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tool result, as JSON. With a test key, a tool that writes returns the simulation (`sandbox: true`, `simulado: true`) and nothing is saved.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "Certu-Modo": {
                "$ref": "#/components/headers/CertuModo"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PetVacinasProximasResposta"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Erro400"
          },
          "401": {
            "$ref": "#/components/responses/Erro401"
          },
          "402": {
            "$ref": "#/components/responses/Erro402"
          },
          "403": {
            "$ref": "#/components/responses/Erro403"
          },
          "404": {
            "$ref": "#/components/responses/Erro404"
          },
          "429": {
            "$ref": "#/components/responses/Erro429"
          },
          "500": {
            "$ref": "#/components/responses/Erro500"
          },
          "503": {
            "$ref": "#/components/responses/Erro503"
          },
          "default": {
            "$ref": "#/components/responses/ErroPadrao"
          }
        },
        "x-mcp-tool": "pet_vacinas_proximas",
        "x-scope": "pets:ler",
        "x-read-only": true
      }
    },
    "/pets/{contato_id}/{pet}": {
      "get": {
        "operationId": "pet_prontuario_ler",
        "summary": "Read a pet's medical record",
        "description": "A pet's medical record: profile (species, breed, sex, birth date, allergies, behavior), weights, vaccines and parasite treatments given, the next doses with the status of each, the visits (complaint, diagnosis, treatment, prescription) and the documents issued. Needs the owner's `contatoId` and the pet name. Read-only.",
        "tags": [
          "pets"
        ],
        "parameters": [
          {
            "name": "contato_id",
            "in": "path",
            "required": true,
            "description": "The pet owner's `contatoId`, from pets_listar.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,128}$"
            }
          },
          {
            "name": "pet",
            "in": "path",
            "required": true,
            "description": "The pet name as it appears in pets_listar.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 80
            }
          },
          {
            "name": "atendimentos",
            "in": "query",
            "required": false,
            "description": "How many visits to return, newest first. Default 10.",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 50
            }
          },
          {
            "name": "conta",
            "in": "query",
            "required": false,
            "description": "The account to act on, when it is not yours (partner client, another business of the same owner, admin). Empty = your own.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,64}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tool result, as JSON. With a test key, a tool that writes returns the simulation (`sandbox: true`, `simulado: true`) and nothing is saved.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "Certu-Modo": {
                "$ref": "#/components/headers/CertuModo"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PetProntuarioLerResposta"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Erro400"
          },
          "401": {
            "$ref": "#/components/responses/Erro401"
          },
          "402": {
            "$ref": "#/components/responses/Erro402"
          },
          "403": {
            "$ref": "#/components/responses/Erro403"
          },
          "404": {
            "$ref": "#/components/responses/Erro404"
          },
          "429": {
            "$ref": "#/components/responses/Erro429"
          },
          "500": {
            "$ref": "#/components/responses/Erro500"
          },
          "502": {
            "$ref": "#/components/responses/Erro502"
          },
          "503": {
            "$ref": "#/components/responses/Erro503"
          },
          "default": {
            "$ref": "#/components/responses/ErroPadrao"
          }
        },
        "x-mcp-tool": "pet_prontuario_ler",
        "x-scope": "pets:ler",
        "x-read-only": true
      }
    },
    "/imoveis": {
      "get": {
        "operationId": "imoveis_listar",
        "summary": "List properties",
        "description": "Lists the real estate agency's property portfolio with code, type, sale or rent, status, price, neighborhood, bedrooms, whether it is on the listing portals and on the showcase site, what is missing to go to the portals, how many interested leads and visits, and how many days it has been on the market. Includes the portfolio summary. Values in Brazilian reais. Read-only.",
        "tags": [
          "real-estate"
        ],
        "parameters": [
          {
            "name": "busca",
            "in": "query",
            "required": false,
            "description": "Code, title, neighborhood or city.",
            "schema": {
              "type": "string",
              "maxLength": 100
            }
          },
          {
            "name": "situacao",
            "in": "query",
            "required": false,
            "description": "Only properties in this status.",
            "schema": {
              "type": "string",
              "enum": [
                "disponivel",
                "reservado",
                "vendido",
                "alugado",
                "inativo"
              ]
            }
          },
          {
            "name": "transacao",
            "in": "query",
            "required": false,
            "description": "Only properties for sale or only for rent.",
            "schema": {
              "type": "string",
              "enum": [
                "venda",
                "aluguel"
              ]
            }
          },
          {
            "name": "quartos",
            "in": "query",
            "required": false,
            "description": "At least this many bedrooms.",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 20
            }
          },
          {
            "name": "preco_max",
            "in": "query",
            "required": false,
            "description": "Maximum price in Brazilian reais (sale or rent price, depending on `transacao`).",
            "schema": {
              "type": "number",
              "minimum": 0,
              "maximum": 1000000000
            }
          },
          {
            "name": "limite",
            "in": "query",
            "required": false,
            "description": "How many properties to return. Default 50.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "conta",
            "in": "query",
            "required": false,
            "description": "The account to act on, when it is not yours (partner client, another business of the same owner, admin). Empty = your own.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,64}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tool result, as JSON. With a test key, a tool that writes returns the simulation (`sandbox: true`, `simulado: true`) and nothing is saved.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "Certu-Modo": {
                "$ref": "#/components/headers/CertuModo"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImoveisListarResposta"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Erro400"
          },
          "401": {
            "$ref": "#/components/responses/Erro401"
          },
          "402": {
            "$ref": "#/components/responses/Erro402"
          },
          "403": {
            "$ref": "#/components/responses/Erro403"
          },
          "404": {
            "$ref": "#/components/responses/Erro404"
          },
          "429": {
            "$ref": "#/components/responses/Erro429"
          },
          "500": {
            "$ref": "#/components/responses/Erro500"
          },
          "502": {
            "$ref": "#/components/responses/Erro502"
          },
          "503": {
            "$ref": "#/components/responses/Erro503"
          },
          "default": {
            "$ref": "#/components/responses/ErroPadrao"
          }
        },
        "x-mcp-tool": "imoveis_listar",
        "x-scope": "imoveis:ler",
        "x-read-only": true
      }
    },
    "/imoveis/{id}": {
      "get": {
        "operationId": "imovel_ler",
        "summary": "Read a property",
        "description": "One full property, by `id` or by code: prices, condo fee, property tax, areas, rooms, features, address, description, photos, video, status, whether it goes out to the portals and the showcase site and what is missing for that. Values in Brazilian reais. Read-only.",
        "tags": [
          "real-estate"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The `id` returned by imoveis_listar.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,128}$"
            }
          },
          {
            "name": "conta",
            "in": "query",
            "required": false,
            "description": "The account to act on, when it is not yours (partner client, another business of the same owner, admin). Empty = your own.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,64}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tool result, as JSON. With a test key, a tool that writes returns the simulation (`sandbox: true`, `simulado: true`) and nothing is saved.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "Certu-Modo": {
                "$ref": "#/components/headers/CertuModo"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImovelLerResposta"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Erro400"
          },
          "401": {
            "$ref": "#/components/responses/Erro401"
          },
          "402": {
            "$ref": "#/components/responses/Erro402"
          },
          "403": {
            "$ref": "#/components/responses/Erro403"
          },
          "404": {
            "$ref": "#/components/responses/Erro404"
          },
          "429": {
            "$ref": "#/components/responses/Erro429"
          },
          "500": {
            "$ref": "#/components/responses/Erro500"
          },
          "502": {
            "$ref": "#/components/responses/Erro502"
          },
          "503": {
            "$ref": "#/components/responses/Erro503"
          },
          "default": {
            "$ref": "#/components/responses/ErroPadrao"
          }
        },
        "x-mcp-tool": "imovel_ler",
        "x-scope": "imoveis:ler",
        "x-read-only": true
      }
    },
    "/imobiliaria/leads": {
      "get": {
        "operationId": "imob_leads_roleta",
        "summary": "Leads and agent rotation",
        "description": "The leads from the listing portals and the showcase site over the last 30 days and the agent rotation: how leads are distributed, the time to accept, who is on duty, and each lead with the property, the agent, the status (aguardando, aceito, sem-corretor, esgotado), the attempts and the response time. With `desempenho_dias`, each agent's performance in the period. Distributes nothing and notifies nobody. Read-only.",
        "tags": [
          "real-estate"
        ],
        "parameters": [
          {
            "name": "situacao",
            "in": "query",
            "required": false,
            "description": "Only leads in this status.",
            "schema": {
              "type": "string",
              "enum": [
                "aguardando",
                "aceito",
                "sem-corretor",
                "esgotado"
              ]
            }
          },
          {
            "name": "corretor",
            "in": "query",
            "required": false,
            "description": "Only leads of this agent (the `id` from the list of agents).",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,128}$"
            }
          },
          {
            "name": "limite",
            "in": "query",
            "required": false,
            "description": "How many leads to return, newest first. Default 50; 0 returns only the distribution settings and the summary.",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 200
            }
          },
          {
            "name": "desempenho",
            "in": "query",
            "required": false,
            "description": "Includes each agent's performance over the last this many days.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 180
            }
          },
          {
            "name": "conta",
            "in": "query",
            "required": false,
            "description": "The account to act on, when it is not yours (partner client, another business of the same owner, admin). Empty = your own.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,64}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tool result, as JSON. With a test key, a tool that writes returns the simulation (`sandbox: true`, `simulado: true`) and nothing is saved.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "Certu-Modo": {
                "$ref": "#/components/headers/CertuModo"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImobLeadsRoletaResposta"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Erro400"
          },
          "401": {
            "$ref": "#/components/responses/Erro401"
          },
          "402": {
            "$ref": "#/components/responses/Erro402"
          },
          "403": {
            "$ref": "#/components/responses/Erro403"
          },
          "404": {
            "$ref": "#/components/responses/Erro404"
          },
          "429": {
            "$ref": "#/components/responses/Erro429"
          },
          "500": {
            "$ref": "#/components/responses/Erro500"
          },
          "502": {
            "$ref": "#/components/responses/Erro502"
          },
          "503": {
            "$ref": "#/components/responses/Erro503"
          },
          "default": {
            "$ref": "#/components/responses/ErroPadrao"
          }
        },
        "x-mcp-tool": "imob_leads_roleta",
        "x-scope": "imoveis:ler",
        "x-read-only": true
      }
    },
    "/notas": {
      "get": {
        "operationId": "notas_listar",
        "summary": "List tax invoices",
        "description": "Lists the account's Brazilian electronic tax invoices (NFS-e, NFC-e and NF-e), newest first, with number, status (emitida, erro, cancelada, rascunho), amount, customer, service month and the rejection reason when it failed, and says whether the issuer is set up and what is missing. Values in Brazilian reais. Read-only: it never issues or cancels an invoice.",
        "tags": [
          "invoices"
        ],
        "parameters": [
          {
            "name": "mes",
            "in": "query",
            "required": false,
            "description": "Only invoices for services in this month, YYYY-MM.",
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-(0[1-9]|1[0-2])$"
            }
          },
          {
            "name": "situacao",
            "in": "query",
            "required": false,
            "description": "Only invoices in this status.",
            "schema": {
              "type": "string",
              "enum": [
                "emitida",
                "erro",
                "cancelada",
                "rascunho"
              ]
            }
          },
          {
            "name": "limite",
            "in": "query",
            "required": false,
            "description": "How many invoices to return. Default 50.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "conta",
            "in": "query",
            "required": false,
            "description": "The account to act on, when it is not yours (partner client, another business of the same owner, admin). Empty = your own.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,64}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tool result, as JSON. With a test key, a tool that writes returns the simulation (`sandbox: true`, `simulado: true`) and nothing is saved.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "Certu-Modo": {
                "$ref": "#/components/headers/CertuModo"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotasListarResposta"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Erro400"
          },
          "401": {
            "$ref": "#/components/responses/Erro401"
          },
          "402": {
            "$ref": "#/components/responses/Erro402"
          },
          "403": {
            "$ref": "#/components/responses/Erro403"
          },
          "404": {
            "$ref": "#/components/responses/Erro404"
          },
          "429": {
            "$ref": "#/components/responses/Erro429"
          },
          "500": {
            "$ref": "#/components/responses/Erro500"
          },
          "502": {
            "$ref": "#/components/responses/Erro502"
          },
          "503": {
            "$ref": "#/components/responses/Erro503"
          },
          "default": {
            "$ref": "#/components/responses/ErroPadrao"
          }
        },
        "x-mcp-tool": "notas_listar",
        "x-scope": "fiscal:ler",
        "x-read-only": true
      }
    },
    "/notas/{id}": {
      "get": {
        "operationId": "nota_status",
        "summary": "Status of a tax invoice",
        "description": "The status of ONE electronic tax invoice, by `id`: number, access key, amount, taxes, customer, service month, the reason for rejection or cancellation, the PDF and XML links and whether it was sent to the customer. Shows what is stored, without asking the city or the state tax authority again. Values in Brazilian reais. Read-only.",
        "tags": [
          "invoices"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The `id` returned by notas_listar.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,64}$"
            }
          },
          {
            "name": "conta",
            "in": "query",
            "required": false,
            "description": "The account to act on, when it is not yours (partner client, another business of the same owner, admin). Empty = your own.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,64}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tool result, as JSON. With a test key, a tool that writes returns the simulation (`sandbox: true`, `simulado: true`) and nothing is saved.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "Certu-Modo": {
                "$ref": "#/components/headers/CertuModo"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotaStatusResposta"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Erro400"
          },
          "401": {
            "$ref": "#/components/responses/Erro401"
          },
          "402": {
            "$ref": "#/components/responses/Erro402"
          },
          "403": {
            "$ref": "#/components/responses/Erro403"
          },
          "404": {
            "$ref": "#/components/responses/Erro404"
          },
          "429": {
            "$ref": "#/components/responses/Erro429"
          },
          "500": {
            "$ref": "#/components/responses/Erro500"
          },
          "502": {
            "$ref": "#/components/responses/Erro502"
          },
          "503": {
            "$ref": "#/components/responses/Erro503"
          },
          "default": {
            "$ref": "#/components/responses/ErroPadrao"
          }
        },
        "x-mcp-tool": "nota_status",
        "x-scope": "fiscal:ler",
        "x-read-only": true
      }
    },
    "/clinica/nps": {
      "get": {
        "operationId": "clinica_nps_resumo",
        "summary": "Post-visit survey results",
        "description": "The results of the post-visit survey (NPS, 0 to 10) for a period: the NPS score, how many surveys went out and how many came back, promoters, passives and detractors, how many tapped the button to review on Google, NPS by professional and by month and the latest comments, detractors first. Read-only.",
        "tags": [
          "clinic"
        ],
        "parameters": [
          {
            "name": "dias",
            "in": "query",
            "required": false,
            "description": "The period, in days up to today. Default 90.",
            "schema": {
              "type": "integer",
              "minimum": 7,
              "maximum": 365
            }
          },
          {
            "name": "comentarios",
            "in": "query",
            "required": false,
            "description": "How many comments to return. Default 10.",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 50
            }
          },
          {
            "name": "conta",
            "in": "query",
            "required": false,
            "description": "The account to act on, when it is not yours (partner client, another business of the same owner, admin). Empty = your own.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,64}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tool result, as JSON. With a test key, a tool that writes returns the simulation (`sandbox: true`, `simulado: true`) and nothing is saved.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "Certu-Modo": {
                "$ref": "#/components/headers/CertuModo"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClinicaNpsResumoResposta"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Erro400"
          },
          "401": {
            "$ref": "#/components/responses/Erro401"
          },
          "402": {
            "$ref": "#/components/responses/Erro402"
          },
          "403": {
            "$ref": "#/components/responses/Erro403"
          },
          "404": {
            "$ref": "#/components/responses/Erro404"
          },
          "429": {
            "$ref": "#/components/responses/Erro429"
          },
          "500": {
            "$ref": "#/components/responses/Erro500"
          },
          "502": {
            "$ref": "#/components/responses/Erro502"
          },
          "503": {
            "$ref": "#/components/responses/Erro503"
          },
          "default": {
            "$ref": "#/components/responses/ErroPadrao"
          }
        },
        "x-mcp-tool": "clinica_nps_resumo",
        "x-scope": "clinica:ler",
        "x-read-only": true
      }
    },
    "/mcp": {
      "post": {
        "operationId": "mcp",
        "summary": "MCP server (JSON-RPC 2.0)",
        "description": "Streamable HTTP MCP server, stateless and without SSE: each POST carries one JSON-RPC 2.0 message (or a batch) and gets JSON back. Methods: `initialize`, `ping`, `tools/list`, `tools/call`. The tools are the same operations as in this document. Protocol versions: 2025-11-25, 2025-06-18, 2025-03-26. Without a key, the 401 carries `WWW-Authenticate` with the OAuth metadata (/.well-known/oauth-protected-resource).",
        "tags": [
          "mcp"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "description": "JSON-RPC 2.0 message.",
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/JsonRpcPedido"
                  },
                  {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/JsonRpcPedido"
                    },
                    "minItems": 1
                  }
                ]
              },
              "example": {
                "jsonrpc": "2.0",
                "id": 1,
                "method": "tools/list"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON-RPC 2.0 response (or a list of them, for a batch). Tool errors come here, as a result with `isError: true`.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "Certu-Modo": {
                "$ref": "#/components/headers/CertuModo"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/JsonRpcResposta"
                    },
                    {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/JsonRpcResposta"
                      },
                      "minItems": 1
                    }
                  ]
                }
              }
            }
          },
          "202": {
            "description": "Notification or response received: no body."
          },
          "400": {
            "$ref": "#/components/responses/ErroMcp400"
          },
          "401": {
            "$ref": "#/components/responses/ErroMcp401"
          },
          "402": {
            "$ref": "#/components/responses/Erro402"
          },
          "413": {
            "$ref": "#/components/responses/Erro413"
          },
          "429": {
            "$ref": "#/components/responses/Erro429"
          },
          "500": {
            "$ref": "#/components/responses/Erro500"
          },
          "503": {
            "$ref": "#/components/responses/Erro503"
          },
          "default": {
            "$ref": "#/components/responses/ErroPadrao"
          }
        }
      }
    }
  },
  "x-deprecation-policy": {
    "currentVersion": "v1",
    "changes": "additive-only",
    "additiveChanges": [
      "new-fields",
      "new-endpoints",
      "new-optional-parameters"
    ],
    "breakingChanges": {
      "newVersionPath": "/api/v2"
    },
    "beforeRemovalOrChange": {
      "emailKeyOwners": true,
      "responseHeaders": [
        {
          "name": "Deprecation",
          "spec": "RFC 9745"
        },
        {
          "name": "Sunset",
          "spec": "RFC 8594"
        }
      ]
    },
    "deprecatedOperationsMarker": "deprecated: true",
    "description": "v1 changes are additive only. Breaking changes ship under /api/v2. Before removing or changing anything in v1, key owners are notified by email and the affected endpoints send Deprecation and Sunset headers with the date.",
    "externalDocs": {
      "description": "Versioning and deprecation policy",
      "url": "https://certuai.com/docs#versioning"
    }
  },
  "components": {
    "securitySchemes": {
      "chave": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "certu_sk_...",
        "description": "API key: `certu_sk_...` (live) or `certu_sk_test_...` (test). The claude.ai connector token also works."
      }
    },
    "headers": {
      "RateLimitPolicy": {
        "description": "The per-key limit policy (IETF draft-ietf-httpapi-ratelimit-headers, structured field): `\"minuto\";q=<requests>;w=60`. Sent on every API response.",
        "schema": {
          "type": "string",
          "examples": [
            "\"minuto\";q=60;w=60"
          ]
        }
      },
      "RateLimit": {
        "description": "The state of the current window (IETF draft-ietf-httpapi-ratelimit-headers): `\"minuto\";r=<remaining>;t=<seconds until reset>`. Sent once the key has been counted against the limit.",
        "schema": {
          "type": "string",
          "examples": [
            "\"minuto\";r=59;t=60"
          ]
        }
      },
      "RateLimitLimit": {
        "description": "Requests per minute allowed on this key.",
        "schema": {
          "type": "integer"
        }
      },
      "RateLimitRemaining": {
        "description": "Requests left in this minute.",
        "schema": {
          "type": "integer"
        }
      },
      "CertuModo": {
        "description": "`teste` when the key is a test (sandbox) key.",
        "schema": {
          "type": "string",
          "enum": [
            "teste"
          ]
        }
      },
      "RetryAfter": {
        "description": "Seconds until the per-minute limit resets.",
        "schema": {
          "type": "integer"
        }
      },
      "Deprecation": {
        "description": "RFC 9745: only on responses from a deprecated endpoint, with the date it became deprecated.",
        "schema": {
          "type": "string"
        }
      },
      "Sunset": {
        "description": "RFC 8594: only on responses from a deprecated endpoint, with the date it stops answering.",
        "schema": {
          "type": "string"
        }
      },
      "WWWAuthenticate": {
        "description": "Only on the MCP 401: points to the OAuth metadata (`resource_metadata`) so the client can find where to sign in.",
        "schema": {
          "type": "string"
        }
      }
    },
    "schemas": {
      "Erro": {
        "type": "object",
        "description": "The single error shape of the REST API: `error` is the stable, machine-readable code; `message` explains it for people; `detalhes` lists each parameter problem, when there are any.",
        "required": [
          "error",
          "message"
        ],
        "properties": {
          "error": {
            "type": "string",
            "description": "Stable error code, for example `parametros_invalidos`, `chave_invalida`, `plano`, `escopo_insuficiente`, `limite`, `falha_interna`.",
            "examples": [
              "parametros_invalidos",
              "chave_invalida",
              "limite"
            ]
          },
          "message": {
            "type": "string",
            "description": "What happened and what to do, as human-readable text."
          },
          "detalhes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Each problem found while validating the parameters."
          }
        }
      },
      "SimulacaoSandbox": {
        "type": "object",
        "properties": {
          "sandbox": {
            "type": "boolean",
            "const": true
          },
          "simulado": {
            "type": "boolean",
            "const": true
          },
          "ferramenta": {
            "type": "string",
            "description": "Name of the simulated tool."
          },
          "argumentos": {
            "type": "object",
            "additionalProperties": true,
            "description": "The accepted arguments."
          },
          "mensagem": {
            "type": "string"
          }
        },
        "required": [
          "sandbox",
          "simulado",
          "ferramenta",
          "argumentos",
          "mensagem"
        ],
        "description": "Test-key answer to a tool that writes: the parameters passed validation and nothing was saved or sent."
      },
      "ContaResumoResposta": {
        "type": "object",
        "properties": {
          "plano": {
            "type": "object",
            "properties": {
              "id": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Plan tier id (an opaque key, not a price)."
              },
              "nome": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "nome"
            ]
          },
          "creditos": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "doMes": {
                "type": "number",
                "description": "Credits granted this month."
              },
              "usadosNoMes": {
                "type": "number"
              },
              "restamNoMes": {
                "type": "number"
              },
              "avulsos": {
                "type": "number",
                "description": "Credits bought separately."
              },
              "restamParaAcoes": {
                "type": "number"
              }
            },
            "required": [
              "doMes",
              "usadosNoMes",
              "restamNoMes",
              "avulsos",
              "restamParaAcoes"
            ],
            "description": "Credits; null when the read failed."
          },
          "inclui": {
            "type": "object",
            "properties": {
              "agenteDeAnuncios": {
                "type": [
                  "boolean",
                  "null"
                ],
                "description": "Paid ads manager; null when the plan could not be read."
              },
              "publicarSite": {
                "type": "boolean"
              },
              "instagramEMessenger": {
                "type": "boolean"
              },
              "erp": {
                "type": "boolean"
              }
            },
            "required": [
              "agenteDeAnuncios",
              "publicarSite",
              "instagramEMessenger",
              "erp"
            ],
            "description": "What the plan includes."
          }
        },
        "required": [
          "plano",
          "creditos",
          "inclui"
        ],
        "description": "Plan, credits and what the plan includes."
      },
      "ConversasListarResposta": {
        "type": "object",
        "properties": {
          "conversasOlhadas": {
            "type": "integer",
            "description": "How many recent conversations were read to filter."
          },
          "encontradas": {
            "type": "integer",
            "description": "How many matched the filters, before the limit."
          },
          "mostrando": {
            "type": "integer",
            "description": "How many came in this response."
          },
          "conversas": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "contato": {
                  "type": "string",
                  "description": "The contact, to use in conversa_ler."
                },
                "canal": {
                  "type": "string"
                },
                "nome": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "atualizadaEm": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Date and time (ISO 8601), or null."
                },
                "ultimaDoClienteEm": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Date and time (ISO 8601), or null."
                },
                "naoLida": {
                  "type": "boolean"
                },
                "iaPausadaNestaConversa": {
                  "type": "boolean"
                },
                "passouProDonoEm": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Date and time (ISO 8601), or null."
                },
                "atendidaPor": {
                  "description": "Who on the team is handling it."
                },
                "rascunhoEsperandoAprovacao": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "ultimaMensagem": {
                  "type": [
                    "object",
                    "null"
                  ],
                  "properties": {
                    "de": {
                      "type": "string",
                      "enum": [
                        "cliente",
                        "empresa"
                      ],
                      "description": "Who wrote it: `cliente` (the customer) or `empresa` (the business: the AI or a team member)."
                    },
                    "texto": {
                      "type": "string",
                      "description": "Message text, cut at the maximum length."
                    },
                    "em": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Date and time (ISO 8601), or null."
                    },
                    "midia": {
                      "type": "string",
                      "enum": [
                        "imagem",
                        "audio",
                        "documento"
                      ],
                      "description": "Attached media type, when there is one."
                    }
                  },
                  "required": [
                    "de",
                    "texto",
                    "em"
                  ],
                  "description": "One message of the conversation."
                }
              },
              "required": [
                "nome",
                "atualizadaEm",
                "ultimaDoClienteEm",
                "naoLida",
                "iaPausadaNestaConversa",
                "passouProDonoEm",
                "rascunhoEsperandoAprovacao",
                "ultimaMensagem"
              ]
            }
          },
          "aviso": {
            "type": "string",
            "description": "Plain-text notice to show the owner."
          }
        },
        "required": [
          "conversasOlhadas",
          "encontradas",
          "mostrando",
          "conversas"
        ],
        "description": "Most recent conversations, newest first."
      },
      "ConversaLerResposta": {
        "type": "object",
        "properties": {
          "contato": {
            "type": "string"
          },
          "canal": {
            "type": [
              "string",
              "null"
            ]
          },
          "total": {
            "type": "integer",
            "description": "How many exist, before the limit."
          },
          "mostrando": {
            "type": "integer",
            "description": "How many came in this response."
          },
          "fonte": {
            "type": "string",
            "enum": [
              "arquivo",
              "ultimas_mensagens"
            ],
            "description": "`arquivo` (permanent history) or `ultimas_mensagens` (only the window stored on the conversation)."
          },
          "completo": {
            "type": "boolean"
          },
          "mensagens": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "de": {
                  "type": "string",
                  "enum": [
                    "cliente",
                    "empresa"
                  ],
                  "description": "Who wrote it: `cliente` (the customer) or `empresa` (the business: the AI or a team member)."
                },
                "texto": {
                  "type": "string",
                  "description": "Message text, cut at the maximum length."
                },
                "em": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time",
                  "description": "Date and time (ISO 8601), or null."
                },
                "midia": {
                  "type": "string",
                  "enum": [
                    "imagem",
                    "audio",
                    "documento"
                  ],
                  "description": "Attached media type, when there is one."
                }
              },
              "required": [
                "de",
                "texto",
                "em"
              ],
              "description": "One message of the conversation."
            },
            "description": "Oldest first."
          }
        },
        "required": [
          "contato",
          "canal",
          "total",
          "mostrando",
          "fonte",
          "completo",
          "mensagens"
        ],
        "description": "The history of one conversation."
      },
      "CerebroListarResposta": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer",
            "description": "How many exist, before the limit."
          },
          "mostrando": {
            "type": "integer",
            "description": "How many came in this response."
          },
          "fichas": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "Record id, to use in the other tools."
                },
                "titulo": {
                  "type": "string"
                },
                "conteudo": {
                  "type": "string"
                },
                "categoria": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "atualizadaEm": {}
              },
              "required": [
                "id",
                "titulo",
                "conteudo",
                "categoria",
                "atualizadaEm"
              ]
            }
          }
        },
        "required": [
          "total",
          "mostrando",
          "fichas"
        ],
        "description": "Knowledge base entries."
      },
      "CerebroSalvarResposta": {
        "description": "Entry saved.",
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "ok": {
                "type": "boolean",
                "description": "Always true when the operation went through."
              },
              "id": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Record id, to use in the other tools."
              },
              "pendenteDeAprovacao": {
                "type": "boolean",
                "description": "The entry waits for the owner to approve it in the app before it applies."
              },
              "aviso": {
                "description": "Plain-text notice to show the owner."
              }
            },
            "required": [
              "ok",
              "id",
              "pendenteDeAprovacao"
            ]
          },
          {
            "$ref": "#/components/schemas/SimulacaoSandbox"
          }
        ]
      },
      "CerebroApagarResposta": {
        "description": "Deleted entries.",
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "ok": {
                "type": "boolean",
                "description": "Always true when the operation went through."
              },
              "apagadas": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "titulo": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "titulo"
                  ]
                }
              },
              "naoAchadas": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Ids that did not exist."
              }
            },
            "required": [
              "ok",
              "apagadas"
            ]
          },
          {
            "$ref": "#/components/schemas/SimulacaoSandbox"
          }
        ]
      },
      "ProdutosListarResposta": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer",
            "description": "How many exist, before the limit."
          },
          "produtos": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "Record id, to use in the other tools."
                },
                "nome": {
                  "type": "string"
                },
                "preco": {
                  "type": "string",
                  "description": "Price as the customer hears it (free text)."
                },
                "descricao": {
                  "type": "string"
                },
                "disponivel": {
                  "type": "boolean"
                },
                "exemplo": {
                  "type": "boolean",
                  "description": "Sample product with a made-up price: the AI does not use it."
                },
                "aviso": {
                  "type": "string",
                  "description": "Plain-text notice to show the owner."
                },
                "unidade": {},
                "codigo": {},
                "grupo": {},
                "estoque": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "description": "Stock balance, when the product tracks stock."
                }
              },
              "required": [
                "id",
                "nome",
                "preco",
                "descricao",
                "disponivel"
              ]
            }
          }
        },
        "required": [
          "total",
          "produtos"
        ],
        "description": "Products and services."
      },
      "ProdutoSalvarResposta": {
        "description": "Product saved.",
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "ok": {
                "type": "boolean",
                "description": "Always true when the operation went through."
              },
              "id": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Record id, to use in the other tools."
              }
            },
            "required": [
              "ok",
              "id"
            ]
          },
          {
            "$ref": "#/components/schemas/SimulacaoSandbox"
          }
        ]
      },
      "AgenteLerResposta": {
        "type": "object",
        "properties": {
          "ajustaveisPorAqui": {
            "type": "object",
            "additionalProperties": true,
            "description": "The fields agente_ajustar can change, with their current value."
          },
          "configuracaoCompleta": {
            "type": "object",
            "additionalProperties": true,
            "description": "The full AI configuration, as stored."
          }
        },
        "required": [
          "ajustaveisPorAqui",
          "configuracaoCompleta"
        ],
        "description": "WhatsApp AI configuration."
      },
      "AgenteAjustarResposta": {
        "description": "Settings saved.",
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "ok": {
                "type": "boolean",
                "description": "Always true when the operation went through."
              },
              "alterados": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "The fields sent."
              }
            },
            "required": [
              "ok",
              "alterados"
            ]
          },
          {
            "$ref": "#/components/schemas/SimulacaoSandbox"
          }
        ]
      },
      "AnuncioOpcoesResposta": {
        "type": "object",
        "properties": {
          "permitidoNoPlano": {
            "type": "boolean"
          },
          "creditos": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": true,
            "description": "Plan credit balance (granted, used, remaining, extra)."
          },
          "custoDoKitEmCreditos": {
            "type": [
              "number",
              "null"
            ]
          },
          "tiposDeNegocio": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "slug": {
                  "type": "string"
                },
                "nome": {
                  "type": "string"
                },
                "ofertas": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "slug": {
                        "type": "string"
                      },
                      "label": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "slug",
                      "label"
                    ]
                  }
                },
                "orcamentoMensalSugerido": {
                  "type": [
                    "number",
                    "null"
                  ]
                }
              },
              "required": [
                "slug",
                "nome",
                "ofertas",
                "orcamentoMensalSugerido"
              ]
            }
          },
          "formatos": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "slug": {
                  "type": "string"
                },
                "nome": {
                  "type": "string"
                },
                "descricao": {}
              },
              "required": [
                "slug",
                "nome"
              ]
            }
          }
        },
        "required": [
          "permitidoNoPlano",
          "creditos",
          "custoDoKitEmCreditos",
          "tiposDeNegocio",
          "formatos"
        ],
        "description": "What ad options this account has."
      },
      "AnuncioGerarResposta": {
        "description": "Generated campaign kit. Nothing was published.",
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "kitId": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Saved kit id; null when it was not saved."
              },
              "nome": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "aviso": {
                "type": "string",
                "description": "Plain-text notice to show the owner."
              },
              "kit": {
                "type": [
                  "object",
                  "null"
                ],
                "additionalProperties": true,
                "description": "The generated kit (copy, images and audience)."
              }
            },
            "required": [
              "kitId",
              "nome",
              "kit"
            ]
          },
          {
            "$ref": "#/components/schemas/SimulacaoSandbox"
          }
        ]
      },
      "KitsDeCampanha": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer",
            "description": "How many exist, before the limit."
          },
          "kits": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "kitId": {
                  "type": "string",
                  "description": "Record id, to use in the other tools."
                },
                "nome": {},
                "criadoEm": {},
                "tipoDeNegocio": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "oferta": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "publicado": {
                  "type": "boolean"
                },
                "resultados": {
                  "description": "Results of the published kit, or null."
                }
              },
              "required": [
                "kitId",
                "criadoEm",
                "tipoDeNegocio",
                "oferta",
                "publicado",
                "resultados"
              ]
            }
          }
        },
        "required": [
          "total",
          "kits"
        ],
        "description": "Campaign kits already generated."
      },
      "KitDeCampanha": {
        "type": "object",
        "properties": {
          "kitId": {
            "type": "string"
          },
          "tipoDeNegocio": {
            "type": [
              "string",
              "null"
            ]
          },
          "kit": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": true
          },
          "publicacao": {
            "description": "Meta publishing data, or null."
          },
          "resultados": {}
        },
        "required": [
          "kitId",
          "tipoDeNegocio",
          "kit",
          "publicacao",
          "resultados"
        ],
        "description": "One full campaign kit."
      },
      "AnunciosListarResposta": {
        "description": "Response of anuncios_listar: one of KitsDeCampanha, KitDeCampanha.",
        "anyOf": [
          {
            "$ref": "#/components/schemas/KitsDeCampanha"
          },
          {
            "$ref": "#/components/schemas/KitDeCampanha"
          }
        ]
      },
      "AnuncioPublicarPausadoResposta": {
        "description": "Campaign created paused.",
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "status": {
                "description": "Campaign status at Meta; `PAUSED` when it worked."
              },
              "campanhaId": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "linkNoGerenciador": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "whatsapp": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "aviso": {
                "type": "string",
                "description": "Plain-text notice to show the owner."
              }
            },
            "required": [
              "status",
              "campanhaId",
              "linkNoGerenciador",
              "whatsapp",
              "aviso"
            ]
          },
          {
            "$ref": "#/components/schemas/SimulacaoSandbox"
          }
        ]
      },
      "AnunciosCampanhasResposta": {
        "type": "object",
        "properties": {
          "contaDeAnuncios": {
            "type": [
              "string",
              "null"
            ]
          },
          "periodo": {
            "type": "string"
          },
          "total": {
            "type": "integer",
            "description": "How many exist, before the limit."
          },
          "gastoTotal": {
            "type": "number",
            "description": "In the ad account currency."
          },
          "resultadosTotal": {
            "type": "number"
          },
          "custoPorResultadoGeral": {
            "type": [
              "number",
              "null"
            ]
          },
          "campanhas": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "campanhaId": {
                  "type": "string"
                },
                "nome": {},
                "situacao": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "objetivo": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "criadaEm": {},
                "orcamentoDiario": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "gasto": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "resultados": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "custoPorResultado": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "impressoes": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "alcance": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "cliquesNoLink": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "taxaDeCliqueNoLink": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "motivosDeReprovacao": {
                  "type": "array",
                  "items": {}
                },
                "montadaNaCertu": {
                  "type": "boolean"
                },
                "kitId": {
                  "type": "string"
                }
              },
              "required": [
                "campanhaId",
                "situacao",
                "objetivo",
                "criadaEm",
                "orcamentoDiario",
                "gasto",
                "resultados",
                "custoPorResultado",
                "impressoes",
                "alcance",
                "cliquesNoLink",
                "taxaDeCliqueNoLink",
                "montadaNaCertu"
              ]
            }
          },
          "aviso": {
            "type": "string",
            "description": "Plain-text notice to show the owner."
          }
        },
        "required": [
          "contaDeAnuncios",
          "periodo",
          "total",
          "gastoTotal",
          "resultadosTotal",
          "custoPorResultadoGeral",
          "campanhas",
          "aviso"
        ],
        "description": "Campaigns in the Meta ad account, since each one started."
      },
      "AnuncioPausarResposta": {
        "description": "Campaign paused.",
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "campanhaId": {
                "type": "string"
              },
              "situacao": {
                "type": "string",
                "enum": [
                  "pausada"
                ]
              },
              "aviso": {
                "type": "string",
                "description": "Plain-text notice to show the owner."
              }
            },
            "required": [
              "campanhaId",
              "situacao",
              "aviso"
            ]
          },
          {
            "$ref": "#/components/schemas/SimulacaoSandbox"
          }
        ]
      },
      "AnuncioOrcamentoResposta": {
        "description": "Budget changed.",
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "campanhaId": {
                "type": "string"
              },
              "orcamentoDiario": {
                "type": "number",
                "description": "New daily total."
              },
              "porConjunto": {
                "type": "array",
                "items": {},
                "description": "How the total was split across ad sets."
              },
              "ondeMudou": {
                "type": "string",
                "enum": [
                  "na campanha",
                  "nos conjuntos"
                ],
                "description": "Whether the budget changed on the campaign or on the ad sets."
              }
            },
            "required": [
              "campanhaId",
              "orcamentoDiario",
              "ondeMudou"
            ]
          },
          {
            "$ref": "#/components/schemas/SimulacaoSandbox"
          }
        ]
      },
      "AnuncioRelatorioResposta": {
        "type": "object",
        "properties": {
          "campanha": {
            "type": "object",
            "properties": {
              "id": {},
              "nome": {},
              "objetivo": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "situacao": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "criadaEm": {},
              "orcamentoDiario": {},
              "orcamentoTotal": {},
              "moeda": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "linkNoGerenciador": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "nome",
              "objetivo",
              "situacao",
              "criadaEm",
              "orcamentoDiario",
              "orcamentoTotal",
              "moeda",
              "linkNoGerenciador"
            ]
          },
          "periodo": {
            "type": "string"
          },
          "metricas": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": true,
            "description": "Campaign metrics for the period."
          },
          "publico": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": true
          },
          "conjuntos": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "nome": {},
                "situacao": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "orcamentoDiario": {},
                "otimizacao": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "situacao",
                "orcamentoDiario",
                "otimizacao"
              ]
            }
          },
          "anuncios": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "nome": {},
                "situacao": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "motivosDeReprovacao": {
                  "type": "array",
                  "items": {}
                },
                "texto": {
                  "type": "string"
                },
                "titulo": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "botao": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "imagem": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "video": {
                  "type": "boolean"
                },
                "link": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "metricas": {
                  "type": [
                    "object",
                    "null"
                  ],
                  "additionalProperties": true
                }
              },
              "required": [
                "situacao",
                "texto",
                "titulo",
                "botao",
                "imagem",
                "video",
                "link",
                "metricas"
              ]
            }
          },
          "diaADia": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true
            },
            "description": "Spend and results by day."
          },
          "lidoEm": {}
        },
        "required": [
          "campanha",
          "periodo",
          "metricas",
          "publico",
          "conjuntos",
          "anuncios",
          "diaADia",
          "lidoEm"
        ],
        "description": "Report of one campaign, read live from Meta."
      },
      "SiteLerResposta": {
        "type": "object",
        "properties": {
          "existe": {
            "type": "boolean"
          },
          "publicado": {
            "type": "boolean"
          },
          "endereco": {
            "type": [
              "string",
              "null"
            ]
          },
          "modelo": {},
          "config": {
            "type": "object",
            "additionalProperties": true,
            "description": "The website content, without the full article text."
          }
        },
        "required": [
          "existe",
          "publicado",
          "endereco",
          "modelo",
          "config"
        ],
        "description": "The account website."
      },
      "SiteCriarResposta": {
        "description": "Website built (not published).",
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "ok": {
                "type": "boolean",
                "description": "Always true when the operation went through."
              },
              "nome": {
                "type": "string"
              },
              "segmento": {
                "type": "string"
              },
              "paginas": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "How many pages the site now has."
              },
              "proximoPasso": {
                "type": "string"
              }
            },
            "required": [
              "ok",
              "nome",
              "segmento",
              "paginas",
              "proximoPasso"
            ]
          },
          {
            "$ref": "#/components/schemas/SimulacaoSandbox"
          }
        ]
      },
      "SitePublicarResposta": {
        "description": "Website live.",
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "ok": {
                "type": "boolean",
                "description": "Always true when the operation went through."
              },
              "endereco": {
                "type": "string"
              },
              "url": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "ok",
              "endereco",
              "url"
            ]
          },
          {
            "$ref": "#/components/schemas/SimulacaoSandbox"
          }
        ]
      },
      "ArtigosDoSite": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer",
            "description": "How many exist, before the limit."
          },
          "artigos": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "slug": {
                  "type": "string"
                },
                "titulo": {},
                "resumo": {},
                "data": {},
                "fonte": {}
              },
              "required": [
                "titulo",
                "resumo",
                "data",
                "fonte"
              ]
            }
          }
        },
        "required": [
          "total",
          "artigos"
        ],
        "description": "Blog articles, newest first."
      },
      "ArtigoDoSite": {
        "type": "object",
        "properties": {
          "slug": {
            "type": "string"
          },
          "titulo": {},
          "resumo": {},
          "data": {},
          "fonte": {},
          "imagem": {},
          "corpo": {
            "description": "The full text."
          }
        },
        "required": [
          "titulo",
          "resumo",
          "data",
          "fonte",
          "imagem",
          "corpo"
        ],
        "description": "One full article."
      },
      "SiteArtigosResposta": {
        "description": "Response of site_artigos: one of ArtigosDoSite, ArtigoDoSite.",
        "anyOf": [
          {
            "$ref": "#/components/schemas/ArtigosDoSite"
          },
          {
            "$ref": "#/components/schemas/ArtigoDoSite"
          }
        ]
      },
      "AgendaListarResposta": {
        "type": "object",
        "properties": {
          "de": {
            "type": "string",
            "description": "Day, YYYY-MM-DD."
          },
          "ate": {
            "type": "string",
            "description": "Day, YYYY-MM-DD."
          },
          "total": {
            "type": "integer",
            "description": "How many exist, before the limit."
          },
          "mostrando": {
            "type": "integer",
            "description": "How many came in this response."
          },
          "pendentes": {
            "type": "integer",
            "description": "Appointments waiting for the owner to confirm."
          },
          "agendamentos": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "Record id, to use in the other tools."
                },
                "cliente": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "telefone": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "servico": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "inicio": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Start in the business local time, YYYY-MM-DDTHH:MM."
                },
                "duracaoMin": {
                  "type": "integer",
                  "description": "Duration in minutes (60 when not set)."
                },
                "status": {
                  "type": "string",
                  "description": "`pendente` (pending), `confirmado`, `cancelado`, `realizado` (done), or the raw value."
                },
                "origem": {
                  "type": "string",
                  "description": "Where it came from: booking link, booked by the business, or the WhatsApp AI."
                },
                "endereco": {
                  "type": "string"
                },
                "linkDaVideochamada": {
                  "type": "string"
                },
                "profissionalId": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "cliente",
                "telefone",
                "servico",
                "inicio",
                "duracaoMin",
                "status",
                "origem"
              ],
              "description": "One appointment."
            }
          },
          "bloqueios": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "Record id, to use in the other tools."
                },
                "dia": {
                  "type": "string",
                  "description": "Day, YYYY-MM-DD."
                },
                "das": {
                  "type": "string",
                  "description": "Starts at, HH:MM."
                },
                "ate": {
                  "type": "string",
                  "description": "Ends at, HH:MM."
                },
                "motivo": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "profissionalId": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "dia",
                "das",
                "ate",
                "motivo"
              ],
              "description": "One calendar block."
            }
          },
          "aviso": {
            "type": "string",
            "description": "Plain-text notice to show the owner."
          }
        },
        "required": [
          "de",
          "ate",
          "total",
          "mostrando",
          "pendentes",
          "agendamentos",
          "bloqueios"
        ],
        "description": "Calendar in the requested range."
      },
      "AgendaMarcarResposta": {
        "description": "Appointment booked and confirmed.",
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "ok": {
                "type": "boolean",
                "description": "Always true when the operation went through."
              },
              "id": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Record id, to use in the other tools."
              },
              "inicio": {
                "type": "string"
              },
              "status": {
                "type": "string",
                "enum": [
                  "confirmado"
                ]
              },
              "aviso": {
                "type": "string",
                "description": "Reminder that the customer was not notified: the API sends no messages."
              }
            },
            "required": [
              "ok",
              "id",
              "inicio",
              "status",
              "aviso"
            ]
          },
          {
            "$ref": "#/components/schemas/SimulacaoSandbox"
          }
        ]
      },
      "AgendaRemarcarResposta": {
        "description": "Appointment rescheduled.",
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "ok": {
                "type": "boolean",
                "description": "Always true when the operation went through."
              },
              "id": {
                "type": "string"
              },
              "antes": {
                "type": "string",
                "description": "Previous start."
              },
              "inicio": {
                "type": "string"
              },
              "aviso": {
                "type": "string",
                "description": "Reminder that the customer was not notified: the API sends no messages."
              }
            },
            "required": [
              "ok",
              "id",
              "antes",
              "inicio",
              "aviso"
            ]
          },
          {
            "$ref": "#/components/schemas/SimulacaoSandbox"
          }
        ]
      },
      "AgendaConfirmarResposta": {
        "description": "Appointment confirmed.",
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "ok": {
                "type": "boolean",
                "description": "Always true when the operation went through."
              },
              "id": {
                "type": "string"
              },
              "status": {
                "type": "string",
                "enum": [
                  "confirmado"
                ]
              },
              "aviso": {
                "type": "string",
                "description": "Reminder that the customer was not notified: the API sends no messages."
              }
            },
            "required": [
              "ok",
              "id",
              "status",
              "aviso"
            ]
          },
          {
            "$ref": "#/components/schemas/SimulacaoSandbox"
          }
        ]
      },
      "AgendaCancelarResposta": {
        "description": "Appointment cancelled.",
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "ok": {
                "type": "boolean",
                "description": "Always true when the operation went through."
              },
              "id": {
                "type": "string"
              },
              "status": {
                "type": "string",
                "enum": [
                  "cancelado"
                ]
              },
              "jaEstavaCancelado": {
                "type": "boolean"
              },
              "cliente": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "telefone": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "inicio": {
                "type": "string"
              },
              "aviso": {
                "type": "string",
                "description": "Reminder that the customer was not notified: the API sends no messages."
              }
            },
            "required": [
              "ok",
              "id",
              "status"
            ]
          },
          {
            "$ref": "#/components/schemas/SimulacaoSandbox"
          }
        ]
      },
      "BloqueioCriado": {
        "description": "Block created.",
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "ok": {
                "type": "boolean",
                "description": "Always true when the operation went through."
              },
              "bloqueio": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "id": {},
                  "dia": {},
                  "das": {},
                  "ate": {},
                  "motivo": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "motivo"
                ]
              },
              "aviso": {
                "type": "string",
                "description": "Plain-text notice to show the owner."
              }
            },
            "required": [
              "ok",
              "bloqueio",
              "aviso"
            ]
          },
          {
            "$ref": "#/components/schemas/SimulacaoSandbox"
          }
        ]
      },
      "BloqueioRemovido": {
        "description": "Block removed.",
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "ok": {
                "type": "boolean",
                "description": "Always true when the operation went through."
              },
              "removido": {
                "type": "string",
                "description": "Removed block id."
              },
              "bloqueiosAgora": {
                "type": [
                  "integer",
                  "null"
                ]
              }
            },
            "required": [
              "ok",
              "removido",
              "bloqueiosAgora"
            ]
          },
          {
            "$ref": "#/components/schemas/SimulacaoSandbox"
          }
        ]
      },
      "AgendaBloquearResposta": {
        "description": "Response of agenda_bloquear: one of BloqueioCriado, BloqueioRemovido.",
        "anyOf": [
          {
            "$ref": "#/components/schemas/BloqueioCriado"
          },
          {
            "$ref": "#/components/schemas/BloqueioRemovido"
          }
        ]
      },
      "ErpEstoqueResposta": {
        "type": "object",
        "properties": {
          "totalControlados": {
            "type": "integer"
          },
          "mostrando": {
            "type": "integer",
            "description": "How many came in this response."
          },
          "produtosSemControleDeEstoque": {},
          "valorEmEstoque": {
            "type": [
              "number",
              "null"
            ],
            "description": "In currency units (cents divided by 100); null when there is no value."
          },
          "custoDoVendidoNoMes": {
            "type": [
              "number",
              "null"
            ],
            "description": "In currency units (cents divided by 100); null when there is no value."
          },
          "avisoCusto": {
            "type": "string",
            "description": "Plain-text notice to show the owner."
          },
          "alertas": {
            "type": "object",
            "properties": {
              "acabou": {
                "type": "array",
                "items": {}
              },
              "acabando": {
                "type": "array",
                "items": {}
              },
              "negativo": {
                "type": "array",
                "items": {}
              }
            },
            "required": [
              "acabou",
              "acabando",
              "negativo"
            ],
            "description": "Products that ran out, are running low or went negative."
          },
          "itens": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "produtoId": {
                  "type": "string",
                  "description": "Record id, to use in the other tools."
                },
                "nome": {},
                "codigo": {},
                "unidade": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "saldo": {},
                "minimo": {},
                "situacao": {
                  "description": "`negativo` (negative), `acabou` (out), `acabando` (low) or `ok`."
                },
                "custoUnitario": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "description": "In currency units (cents divided by 100); null when there is no value."
                },
                "precoDeVenda": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "description": "In currency units (cents divided by 100); null when there is no value."
                },
                "margem": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "description": "In currency units (cents divided by 100); null when there is no value."
                },
                "margemPercentual": {}
              },
              "required": [
                "produtoId",
                "unidade",
                "minimo",
                "custoUnitario",
                "precoDeVenda",
                "margem",
                "margemPercentual"
              ]
            }
          },
          "movimentos": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true
            },
            "description": "Latest stock moves (up to 30), amounts in currency units."
          }
        },
        "required": [
          "totalControlados",
          "mostrando",
          "produtosSemControleDeEstoque",
          "valorEmEstoque",
          "custoDoVendidoNoMes",
          "alertas",
          "itens"
        ],
        "description": "The stock."
      },
      "ErpEstoqueMovimentarResposta": {
        "description": "Stock move recorded.",
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "ok": {
                "type": "boolean",
                "description": "Always true when the operation went through."
              },
              "movimentoId": {},
              "saldoAgora": {},
              "aviso": {
                "type": "string",
                "description": "Plain-text notice to show the owner."
              }
            },
            "required": [
              "ok",
              "movimentoId",
              "saldoAgora"
            ]
          },
          {
            "$ref": "#/components/schemas/SimulacaoSandbox"
          }
        ]
      },
      "ErpCaixaResposta": {
        "type": "object",
        "properties": {
          "mes": {
            "description": "The month, YYYY-MM."
          },
          "de": {},
          "ate": {},
          "resumo": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": true,
            "description": "Paid and expected money in and out, in currency units."
          },
          "resultado": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": true
          },
          "custoDaMercadoriaVendida": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "valor": {
                "type": [
                  "number",
                  "null"
                ],
                "description": "In currency units (cents divided by 100); null when there is no value."
              },
              "aviso": {
                "type": "string"
              },
              "parcial": {
                "type": "boolean"
              }
            },
            "required": [
              "valor"
            ]
          },
          "porCategoria": {},
          "comissoes": {},
          "totalDeLancamentos": {
            "type": "integer"
          },
          "lancamentos": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "Record id, to use in the other tools."
                },
                "tipo": {
                  "description": "`entrada` (in) or `saida` (out)."
                },
                "valor": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "description": "In currency units (cents divided by 100); null when there is no value."
                },
                "descricao": {},
                "categoria": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "dia": {},
                "situacao": {
                  "description": "`pago` (paid) or `previsto` (expected)."
                },
                "forma": {},
                "observacao": {},
                "conferidoComOBanco": {
                  "type": "boolean"
                }
              },
              "required": [
                "id",
                "valor",
                "categoria"
              ]
            }
          }
        },
        "required": [
          "mes",
          "de",
          "ate",
          "resumo",
          "resultado",
          "custoDaMercadoriaVendida",
          "porCategoria",
          "comissoes",
          "totalDeLancamentos",
          "lancamentos"
        ],
        "description": "The cash book for one month. Amounts in currency units."
      },
      "ErpCaixaLancarResposta": {
        "description": "Cash entry saved.",
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "ok": {
                "type": "boolean",
                "description": "Always true when the operation went through."
              },
              "id": {
                "description": "Record id, to use in the other tools."
              },
              "corrigido": {
                "type": "boolean",
                "description": "true when an existing entry was corrected."
              },
              "lancamento": {
                "type": "object",
                "properties": {
                  "tipo": {
                    "type": "string"
                  },
                  "valor": {
                    "type": "number"
                  },
                  "descricao": {
                    "type": "string"
                  },
                  "dia": {
                    "type": "string"
                  }
                },
                "required": [
                  "tipo",
                  "valor",
                  "descricao",
                  "dia"
                ]
              }
            },
            "required": [
              "ok",
              "id",
              "corrigido",
              "lancamento"
            ]
          },
          {
            "$ref": "#/components/schemas/SimulacaoSandbox"
          }
        ]
      },
      "ErpResultadoResposta": {
        "type": "object",
        "properties": {
          "mes": {},
          "demonstrativo": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": true,
            "description": "The month statement, in currency units."
          },
          "comparativo": {},
          "projecaoDoSaldo": {},
          "categoriasSemClassificacao": {
            "type": "array",
            "items": {}
          },
          "aviso": {
            "type": "string",
            "description": "Plain-text notice to show the owner."
          }
        },
        "required": [
          "mes",
          "demonstrativo",
          "comparativo",
          "projecaoDoSaldo",
          "categoriasSemClassificacao"
        ],
        "description": "Income statement."
      },
      "LigacoesListarResposta": {
        "type": "object",
        "properties": {
          "ligacoesOlhadas": {
            "type": "integer"
          },
          "encontradas": {
            "type": "integer",
            "description": "How many matched the filters, before the limit."
          },
          "mostrando": {
            "type": "integer",
            "description": "How many came in this response."
          },
          "pediramRetorno": {
            "type": "integer"
          },
          "minutosNoTotal": {
            "type": "integer"
          },
          "ligacoes": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "Record id, to use in the other tools."
                },
                "em": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "When it started."
                },
                "duracaoSegundos": {
                  "type": "number"
                },
                "tipo": {
                  "type": "string",
                  "enum": [
                    "equipe pelo discador",
                    "atendente de voz"
                  ],
                  "description": "Who spoke for the business: the team through the dialer, or the voice agent."
                },
                "nome": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "telefone": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "motivo": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "resumo": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "pediuRetorno": {
                  "type": "boolean",
                  "description": "The caller asked to talk to someone on the team."
                },
                "resultado": {
                  "type": "string"
                },
                "anotado": {
                  "type": "object",
                  "additionalProperties": true,
                  "description": "What the voice agent collected during the call (free-form fields)."
                }
              },
              "required": [
                "id",
                "em",
                "duracaoSegundos",
                "tipo",
                "nome",
                "telefone",
                "motivo",
                "resumo",
                "pediuRetorno"
              ],
              "description": "One call, without the transcript."
            }
          },
          "aviso": {
            "type": "string",
            "description": "Plain-text notice to show the owner."
          }
        },
        "required": [
          "ligacoesOlhadas",
          "encontradas",
          "mostrando",
          "pediramRetorno",
          "minutosNoTotal",
          "ligacoes"
        ],
        "description": "Calls, newest first."
      },
      "LigacaoLerResposta": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Record id, to use in the other tools."
          },
          "em": {
            "type": [
              "string",
              "null"
            ],
            "description": "When it started."
          },
          "duracaoSegundos": {
            "type": "number"
          },
          "tipo": {
            "type": "string",
            "enum": [
              "equipe pelo discador",
              "atendente de voz"
            ],
            "description": "Who spoke for the business: the team through the dialer, or the voice agent."
          },
          "nome": {
            "type": [
              "string",
              "null"
            ]
          },
          "telefone": {
            "type": [
              "string",
              "null"
            ]
          },
          "motivo": {
            "type": [
              "string",
              "null"
            ]
          },
          "resumo": {
            "type": [
              "string",
              "null"
            ]
          },
          "pediuRetorno": {
            "type": "boolean",
            "description": "The caller asked to talk to someone on the team."
          },
          "resultado": {
            "type": "string"
          },
          "anotado": {
            "type": "object",
            "additionalProperties": true,
            "description": "What the voice agent collected during the call (free-form fields)."
          },
          "correcoesDoDono": {
            "type": "object",
            "additionalProperties": true
          },
          "falas": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "quem": {
                  "type": "string",
                  "enum": [
                    "atendente",
                    "cliente"
                  ]
                },
                "texto": {
                  "type": "string"
                },
                "segundo": {
                  "type": "number"
                }
              },
              "required": [
                "quem",
                "texto"
              ]
            },
            "description": "The transcript turn by turn (up to 300)."
          },
          "avisoFalas": {
            "type": "string"
          },
          "transcricao": {
            "type": "string",
            "description": "Plain-text transcript (team call through the dialer)."
          }
        },
        "required": [
          "id",
          "em",
          "duracaoSegundos",
          "tipo",
          "nome",
          "telefone",
          "motivo",
          "resumo",
          "pediuRetorno",
          "falas"
        ],
        "description": "One full call."
      },
      "CrmFunilResposta": {
        "type": "object",
        "properties": {
          "etapas": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "etapaId": {
                  "type": "string"
                },
                "nome": {},
                "negocios": {
                  "type": "integer"
                },
                "valorSomado": {
                  "type": "number"
                }
              },
              "required": [
                "etapaId",
                "negocios",
                "valorSomado"
              ]
            }
          },
          "campos": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "nome": {}
              },
              "required": [
                "id"
              ]
            }
          },
          "encontrados": {
            "type": "integer",
            "description": "How many matched the filters, before the limit."
          },
          "negocios": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "Record id, to use in the other tools."
                },
                "titulo": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "contato": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "contatoId": {
                  "type": "string"
                },
                "telefone": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "valor": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "description": "In currency units (cents divided by 100); null when there is no value."
                },
                "etapa": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Stage name."
                },
                "etapaId": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "naEtapaDesde": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Date and time (ISO 8601), or null."
                },
                "atualizadoEm": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Date and time (ISO 8601), or null."
                },
                "campos": {
                  "type": "object",
                  "additionalProperties": true,
                  "description": "Filled pipeline fields, by field name."
                },
                "ultimasNotas": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "The 3 most recent notes."
                },
                "totalDeNotas": {
                  "type": "integer"
                }
              },
              "required": [
                "id",
                "titulo",
                "contato",
                "telefone",
                "valor",
                "etapa",
                "etapaId",
                "naEtapaDesde",
                "atualizadoEm"
              ],
              "description": "One pipeline deal."
            }
          }
        },
        "required": [
          "etapas",
          "campos",
          "encontrados",
          "negocios"
        ],
        "description": "The sales pipeline."
      },
      "CrmContatosResposta": {
        "type": "object",
        "properties": {
          "totalNoCrm": {
            "type": "integer"
          },
          "encontrados": {
            "type": "integer",
            "description": "How many matched the filters, before the limit."
          },
          "contatos": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "Record id, to use in the other tools."
                },
                "nome": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "telefone": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "email": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "empresa": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "negocios": {
                  "type": "integer"
                },
                "ultimasNotas": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "atualizadoEm": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Date and time (ISO 8601), or null."
                }
              },
              "required": [
                "id",
                "nome",
                "telefone",
                "email",
                "empresa",
                "negocios",
                "atualizadoEm"
              ]
            }
          }
        },
        "required": [
          "totalNoCrm",
          "encontrados",
          "contatos"
        ],
        "description": "CRM contacts."
      },
      "CrmTarefasResposta": {
        "type": "object",
        "properties": {
          "hoje": {
            "type": "string",
            "description": "Today's date in the business timezone (UTC-3)."
          },
          "atrasadas": {
            "type": "integer"
          },
          "paraHoje": {
            "type": "integer"
          },
          "tarefas": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "Record id, to use in the other tools."
                },
                "titulo": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "contato": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "contatoId": {
                  "type": "string"
                },
                "prazo": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Day, YYYY-MM-DD."
                },
                "situacao": {
                  "type": "string",
                  "enum": [
                    "atrasadas",
                    "hoje",
                    "no prazo",
                    "sem prazo"
                  ]
                }
              },
              "required": [
                "id",
                "titulo",
                "contato",
                "prazo",
                "situacao"
              ]
            }
          }
        },
        "required": [
          "hoje",
          "atrasadas",
          "paraHoje",
          "tarefas"
        ],
        "description": "Open tasks."
      },
      "CrmAlterarResposta": {
        "description": "CRM changes.",
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "ok": {
                "type": "boolean",
                "description": "false when some change was not saved."
              },
              "feito": {
                "description": "What was done, as text."
              },
              "criados": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "tipo": {
                      "type": "string"
                    },
                    "id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "tipo",
                    "id"
                  ]
                },
                "description": "Created records, with their id."
              },
              "aviso": {
                "type": "string",
                "description": "Plain-text notice to show the owner."
              }
            },
            "required": [
              "ok",
              "feito",
              "criados"
            ]
          },
          {
            "$ref": "#/components/schemas/SimulacaoSandbox"
          }
        ]
      },
      "GooglePerfilResposta": {
        "type": "object",
        "properties": {
          "conectado": {
            "type": "boolean"
          },
          "perfil": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "nome": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "cidade": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "categoria": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "linkNoMaps": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "linkPraPedirAvaliacao": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "nome",
              "cidade",
              "categoria",
              "linkNoMaps",
              "linkPraPedirAvaliacao"
            ]
          },
          "iaEscreve": {
            "type": "boolean"
          },
          "custoDoRascunhoEmCreditos": {},
          "aviso": {
            "type": "string",
            "description": "Plain-text notice to show the owner."
          }
        },
        "required": [
          "conectado",
          "perfil",
          "iaEscreve",
          "custoDoRascunhoEmCreditos"
        ],
        "description": "The connected Google Business Profile."
      },
      "GoogleAvaliacoesResposta": {
        "type": "object",
        "properties": {
          "notaMedia": {},
          "totalNoGoogle": {},
          "semResposta": {
            "type": "integer"
          },
          "avaliacoes": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "avaliacao": {
                  "description": "The review name at Google, for google_rascunho and google_publicar."
                },
                "quem": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "estrelas": {},
                "comentario": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "em": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "resposta": {
                  "type": [
                    "object",
                    "null"
                  ],
                  "properties": {
                    "texto": {},
                    "em": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "situacaoNoGoogle": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "em"
                  ]
                }
              },
              "required": [
                "quem",
                "estrelas",
                "comentario",
                "em",
                "resposta"
              ]
            }
          }
        },
        "required": [
          "notaMedia",
          "totalNoGoogle",
          "semResposta",
          "avaliacoes"
        ],
        "description": "Google reviews."
      },
      "GoogleRascunhoResposta": {
        "description": "Draft. Nothing was published.",
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "tipo": {
                "type": "string",
                "enum": [
                  "resposta",
                  "post"
                ]
              },
              "rascunho": {
                "description": "The draft the AI wrote."
              },
              "creditosGastos": {},
              "aviso": {
                "type": "string",
                "description": "Plain-text notice to show the owner."
              }
            },
            "required": [
              "tipo",
              "rascunho",
              "creditosGastos",
              "aviso"
            ]
          },
          {
            "$ref": "#/components/schemas/SimulacaoSandbox"
          }
        ]
      },
      "GooglePublicarResposta": {
        "description": "Published on Google.",
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "ok": {
                "type": "boolean",
                "description": "Always true when the operation went through."
              },
              "tipo": {
                "type": "string",
                "enum": [
                  "resposta",
                  "post"
                ]
              },
              "resposta": {
                "description": "The published reply (reply type)."
              },
              "aviso": {
                "type": "string",
                "description": "Plain-text notice to show the owner."
              },
              "post": {
                "description": "The published post (post type)."
              }
            },
            "required": [
              "ok",
              "tipo"
            ]
          },
          {
            "$ref": "#/components/schemas/SimulacaoSandbox"
          }
        ]
      },
      "GoogleConcorrentesResposta": {
        "type": "object",
        "properties": {
          "negocio": {},
          "cidade": {},
          "posicoes": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "busca": {},
                "posicaoDoNegocio": {}
              },
              "required": [
                "posicaoDoNegocio"
              ]
            }
          },
          "concorrentes": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true
            },
            "description": "Who shows up on Google Maps, with rating and review count."
          }
        },
        "required": [
          "negocio",
          "cidade",
          "posicoes",
          "concorrentes"
        ],
        "description": "Competitors on Google Maps."
      },
      "ParceiroClientesResposta": {
        "type": "object",
        "properties": {
          "parceiro": {},
          "totalDeClientes": {},
          "encontrados": {
            "type": "integer",
            "description": "How many matched the filters, before the limit."
          },
          "clientes": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "conta": {
                  "type": "string",
                  "description": "The `conta` value to pass to the other tools."
                },
                "negocio": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "email": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "whatsapp": {
                  "type": "string",
                  "enum": [
                    "conectado",
                    "não conectado"
                  ]
                },
                "plano": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "licencaAte": {},
                "clienteDesde": {}
              },
              "required": [
                "conta",
                "negocio",
                "email",
                "whatsapp",
                "plano",
                "clienteDesde"
              ]
            }
          }
        },
        "required": [
          "parceiro",
          "totalDeClientes",
          "encontrados",
          "clientes"
        ],
        "description": "The partner's clients."
      },
      "AgenteCriarResposta": {
        "description": "AI agent built. The number was not connected.",
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "ok": {
                "type": "boolean",
                "description": "Always true when the operation went through."
              },
              "atendente": {
                "type": "object",
                "properties": {
                  "nomeDaIa": {
                    "type": "string"
                  },
                  "negocio": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "saudacao": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "tom": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "marcaHorarioSozinha": {
                    "type": "boolean"
                  },
                  "regrasEscritasPeloModelo": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "nomeDaIa",
                  "negocio",
                  "saudacao",
                  "tom",
                  "marcaHorarioSozinha",
                  "regrasEscritasPeloModelo"
                ]
              },
              "segmento": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "cerebro": {
                "type": "object",
                "properties": {
                  "fichasQueJaExistiam": {
                    "type": "integer"
                  },
                  "fichasCriadas": {
                    "type": "integer"
                  },
                  "fichasAtualizadas": {
                    "type": "integer"
                  },
                  "fichasQueFalharam": {
                    "type": "integer"
                  },
                  "fichasComLacuna": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Titles of entries containing [PREENCHER] or [CONFIRMAR] placeholders."
                  },
                  "produtosCriados": {
                    "type": "integer"
                  },
                  "produtosQueJaExistiam": {
                    "type": "integer"
                  },
                  "produtosQueFalharam": {
                    "type": "integer"
                  },
                  "origem": {
                    "type": "string",
                    "enum": [
                      "site",
                      "modelo do ramo",
                      "conversa",
                      "nenhuma"
                    ]
                  }
                },
                "required": [
                  "fichasQueJaExistiam",
                  "fichasCriadas",
                  "fichasAtualizadas",
                  "fichasQueFalharam",
                  "fichasComLacuna",
                  "produtosCriados",
                  "produtosQueJaExistiam",
                  "produtosQueFalharam",
                  "origem"
                ]
              },
              "dadosDeExemplo": {
                "type": "string"
              },
              "whatsapp": {
                "type": "object",
                "properties": {
                  "conectado": {
                    "type": "boolean",
                    "description": "Always false: the owner connects it in the app."
                  },
                  "linkParaConectar": {
                    "type": "string"
                  },
                  "conexao": {
                    "type": "string"
                  },
                  "podeConectar": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  }
                },
                "required": [
                  "conectado",
                  "linkParaConectar",
                  "podeConectar"
                ]
              },
              "linkDoPainel": {
                "type": "string"
              },
              "proximosPassos": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "avisos": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "required": [
              "ok",
              "atendente",
              "segmento",
              "cerebro",
              "whatsapp",
              "linkDoPainel",
              "proximosPassos"
            ]
          },
          {
            "$ref": "#/components/schemas/SimulacaoSandbox"
          }
        ]
      },
      "AgenteTestarResposta": {
        "description": "The AI answer in the rehearsal. Nothing was sent.",
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "resposta": {
                "type": "string",
                "description": "What the AI would answer."
              },
              "semResposta": {
                "type": "boolean",
                "description": "true when the AI did not know the answer."
              },
              "perguntaSemResposta": {
                "type": "string"
              },
              "aviso": {
                "type": "string",
                "description": "Plain-text notice to show the owner."
              },
              "fontes": {
                "type": "array",
                "items": {}
              },
              "imagensQueEnviaria": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "titulo": {
                      "type": "string"
                    },
                    "url": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "titulo",
                    "url"
                  ]
                }
              }
            },
            "required": [
              "resposta",
              "semResposta"
            ]
          },
          {
            "$ref": "#/components/schemas/SimulacaoSandbox"
          }
        ]
      },
      "PedidosListarResposta": {
        "type": "object",
        "properties": {
          "etapas": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "etapaId": {
                  "type": "string"
                },
                "nome": {},
                "papel": {},
                "pedidos": {
                  "type": "integer"
                }
              },
              "required": [
                "etapaId",
                "pedidos"
              ]
            }
          },
          "totalDePedidos": {
            "type": "integer"
          },
          "encontrados": {
            "type": "integer",
            "description": "How many matched the filters, before the limit."
          },
          "pedidos": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "Record id, to use in the other tools."
                },
                "numero": {
                  "type": "integer"
                },
                "nome": {
                  "type": "string",
                  "description": "Type and number, for example \"OS 12\"."
                },
                "tipo": {
                  "type": "string",
                  "description": "`pedido` (order), `os` (work order) or `orcamento` (quote)."
                },
                "etapa": {
                  "type": "string",
                  "description": "Stage name on the board."
                },
                "etapaId": {
                  "type": "string"
                },
                "situacao": {
                  "type": "string",
                  "enum": [
                    "orcamento",
                    "aberto",
                    "aprovado",
                    "andamento",
                    "pronto",
                    "entregue",
                    "cancelado"
                  ],
                  "description": "The role of the stage."
                },
                "cliente": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "telefone": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "total": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "description": "In currency units (cents divided by 100); null when there is no value."
                },
                "itens": {
                  "type": "string",
                  "description": "The items in one line."
                },
                "pago": {
                  "type": "boolean"
                },
                "pagoEm": {},
                "previsao": {
                  "type": "string"
                },
                "responsavel": {
                  "type": "string"
                },
                "aprovacaoDoCliente": {
                  "type": "string"
                },
                "atualizadoEm": {
                  "description": "Last change, as stored."
                }
              },
              "required": [
                "id",
                "numero",
                "nome",
                "tipo",
                "etapa",
                "etapaId",
                "situacao",
                "cliente",
                "telefone",
                "total",
                "itens",
                "pago"
              ],
              "description": "One order, work order or quote."
            }
          }
        },
        "required": [
          "etapas",
          "totalDePedidos",
          "encontrados",
          "pedidos"
        ],
        "description": "Orders, work orders and quotes, newest first."
      },
      "PedidoLerResposta": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Record id, to use in the other tools."
          },
          "numero": {
            "type": "integer"
          },
          "nome": {
            "type": "string",
            "description": "Type and number, for example \"OS 12\"."
          },
          "tipo": {
            "type": "string",
            "description": "`pedido` (order), `os` (work order) or `orcamento` (quote)."
          },
          "etapa": {
            "type": "string",
            "description": "Stage name on the board."
          },
          "etapaId": {
            "type": "string"
          },
          "situacao": {
            "type": "string",
            "enum": [
              "orcamento",
              "aberto",
              "aprovado",
              "andamento",
              "pronto",
              "entregue",
              "cancelado"
            ],
            "description": "The role of the stage."
          },
          "cliente": {
            "type": [
              "string",
              "null"
            ]
          },
          "telefone": {
            "type": [
              "string",
              "null"
            ]
          },
          "total": {
            "type": [
              "number",
              "null"
            ],
            "description": "In currency units (cents divided by 100); null when there is no value."
          },
          "itens": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "tipo": {},
                "descricao": {},
                "quantidade": {},
                "unidade": {},
                "precoUnitario": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "description": "In currency units (cents divided by 100); null when there is no value."
                },
                "desconto": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "description": "In currency units (cents divided by 100); null when there is no value."
                },
                "total": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "description": "In currency units (cents divided by 100); null when there is no value."
                },
                "produtoId": {
                  "type": "string"
                },
                "recusadoPeloCliente": {
                  "type": "boolean"
                }
              },
              "required": [
                "precoUnitario",
                "total"
              ]
            }
          },
          "pago": {
            "type": "boolean"
          },
          "pagoEm": {},
          "previsao": {
            "type": "string"
          },
          "responsavel": {
            "type": "string"
          },
          "aprovacaoDoCliente": {
            "type": "string"
          },
          "atualizadoEm": {
            "description": "Last change, as stored."
          },
          "totais": {
            "type": "object",
            "properties": {
              "subtotal": {
                "type": "number"
              },
              "produtos": {
                "type": "number"
              },
              "servicos": {
                "type": "number"
              },
              "desconto": {
                "type": "number"
              },
              "taxa": {
                "type": "number"
              },
              "total": {
                "type": "number"
              }
            },
            "required": [
              "subtotal",
              "produtos",
              "servicos",
              "desconto",
              "taxa",
              "total"
            ],
            "description": "In currency units (cents divided by 100)."
          },
          "endereco": {},
          "formaDePagamento": {},
          "observacaoParaOCliente": {},
          "notasInternas": {},
          "equipamento": {},
          "aprovacao": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "resultado": {},
              "nome": {},
              "em": {},
              "via": {}
            }
          },
          "cobrancaId": {
            "type": [
              "string",
              "null"
            ]
          },
          "links": {
            "type": "object",
            "properties": {
              "aprovar": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "acompanhar": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "aprovar",
              "acompanhar"
            ],
            "description": "Approval and tracking links, when the owner already created them."
          },
          "historico": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "em": {},
                "tipo": {},
                "texto": {}
              }
            }
          }
        },
        "required": [
          "id",
          "numero",
          "nome",
          "tipo",
          "etapa",
          "etapaId",
          "situacao",
          "cliente",
          "telefone",
          "total",
          "itens",
          "pago",
          "totais",
          "endereco",
          "formaDePagamento",
          "observacaoParaOCliente",
          "notasInternas",
          "aprovacao",
          "cobrancaId",
          "links",
          "historico"
        ],
        "description": "One full order."
      },
      "PedidoCriarResposta": {
        "description": "Order created.",
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "ok": {
                "type": "boolean",
                "description": "Always true when the operation went through."
              },
              "pedido": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "numero": {
                    "type": "integer"
                  },
                  "nome": {
                    "type": "string"
                  },
                  "tipo": {
                    "type": "string"
                  },
                  "etapaId": {
                    "type": "string"
                  },
                  "total": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "description": "In currency units (cents divided by 100); null when there is no value."
                  },
                  "itens": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "numero",
                  "nome",
                  "tipo",
                  "etapaId",
                  "total",
                  "itens"
                ]
              },
              "estoque": {
                "type": "string",
                "description": "What happened to the stock."
              },
              "aviso": {
                "type": "string",
                "description": "Reminder that the customer was not notified: the API sends no messages."
              }
            },
            "required": [
              "ok",
              "pedido",
              "aviso"
            ]
          },
          {
            "$ref": "#/components/schemas/SimulacaoSandbox"
          }
        ]
      },
      "PedidoMudarEtapaResposta": {
        "description": "Order stage.",
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "ok": {
                "type": "boolean",
                "description": "Always true when the operation went through."
              },
              "mudou": {
                "type": "boolean",
                "description": "false when the order was already in that stage."
              },
              "pedido": {
                "type": "string"
              },
              "de": {
                "type": "string"
              },
              "para": {
                "type": "string"
              },
              "estoque": {
                "type": "string"
              },
              "aviso": {
                "type": "string",
                "description": "Reminder that the customer was not notified: the API sends no messages."
              }
            },
            "required": [
              "ok",
              "mudou",
              "de",
              "para"
            ]
          },
          {
            "$ref": "#/components/schemas/SimulacaoSandbox"
          }
        ]
      },
      "CobrancasListarResposta": {
        "type": "object",
        "properties": {
          "contaDeCobranca": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "situacao": {},
              "pixPronto": {
                "type": "boolean"
              },
              "iaPodeCobrar": {
                "type": "boolean"
              }
            },
            "required": [
              "pixPronto",
              "iaPodeCobrar"
            ]
          },
          "aviso": {
            "type": "string",
            "description": "Plain-text notice to show the owner."
          },
          "resumo": {
            "type": "object",
            "properties": {
              "pendentes": {
                "type": "integer"
              },
              "vencidas": {
                "type": "integer"
              },
              "pagas": {
                "type": "integer"
              },
              "aReceber": {
                "type": [
                  "number",
                  "null"
                ],
                "description": "In currency units (cents divided by 100); null when there is no value."
              },
              "recebido": {
                "type": [
                  "number",
                  "null"
                ],
                "description": "In currency units (cents divided by 100); null when there is no value."
              }
            },
            "required": [
              "pendentes",
              "vencidas",
              "pagas",
              "aReceber",
              "recebido"
            ]
          },
          "planosDeAssinatura": {
            "type": "integer"
          },
          "assinaturas": {
            "type": "integer"
          },
          "encontradas": {
            "type": "integer",
            "description": "How many matched the filters, before the limit."
          },
          "cobrancas": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "Record id, to use in the other tools."
                },
                "cliente": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "telefone": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "valor": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "description": "In currency units (cents divided by 100); null when there is no value."
                },
                "descricao": {},
                "vencimento": {},
                "metodo": {},
                "situacao": {
                  "description": "`pendente`, `paga` (paid), `vencida` (overdue), `estornada` (refunded) or `cancelada`."
                },
                "origem": {},
                "link": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "pagaEm": {},
                "valorPago": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "description": "In currency units (cents divided by 100); null when there is no value."
                },
                "mandadaAoCliente": {
                  "type": "boolean"
                },
                "ref": {}
              },
              "required": [
                "id",
                "cliente",
                "telefone",
                "valor",
                "link",
                "mandadaAoCliente"
              ]
            }
          }
        },
        "required": [
          "contaDeCobranca",
          "resumo",
          "planosDeAssinatura",
          "assinaturas",
          "encontradas",
          "cobrancas"
        ],
        "description": "Payment requests, newest first."
      },
      "CobrancaCriarResposta": {
        "description": "Payment request created (not sent to the customer).",
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "ok": {
                "type": "boolean",
                "description": "Always true when the operation went through."
              },
              "jaExistia": {
                "type": "boolean",
                "description": "true when an existing payment request was returned."
              },
              "explicacao": {
                "type": "string"
              },
              "divergencia": {
                "type": "string"
              },
              "cobranca": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "situacao": {},
                  "valor": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "description": "In currency units (cents divided by 100); null when there is no value."
                  },
                  "descricao": {},
                  "vencimento": {},
                  "metodo": {},
                  "link": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "pixCopiaECola": {
                    "type": "string",
                    "description": "Copy-and-paste instant payment code."
                  },
                  "linhaDigitavel": {
                    "type": "string"
                  },
                  "boleto": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "pedido": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "situacao",
                  "valor",
                  "descricao",
                  "vencimento",
                  "metodo",
                  "link"
                ]
              },
              "avisoDoPedido": {
                "type": "string"
              },
              "aviso": {
                "type": "string",
                "description": "Plain-text notice to show the owner."
              }
            },
            "required": [
              "ok",
              "cobranca",
              "aviso"
            ]
          },
          {
            "$ref": "#/components/schemas/SimulacaoSandbox"
          }
        ]
      },
      "RetornosListarResposta": {
        "type": "object",
        "properties": {
          "resumo": {},
          "mensagensQueSairamHoje": {},
          "roteirosLigados": {
            "type": "array",
            "items": {}
          },
          "encontrados": {
            "type": "integer",
            "description": "How many matched the filters, before the limit."
          },
          "retornos": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "Record id, to use in the other tools."
                },
                "roteiroId": {},
                "roteiro": {},
                "cliente": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "telefone": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "sobre": {},
                "motivo": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "situacao": {
                  "description": "`pendente`, `enviado` (sent), `agendado` (booked), `convertido` (converted), `dispensado` (dismissed), or the raw value."
                },
                "saiEm": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Date and time (ISO 8601), or null."
                },
                "saiuEm": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Date and time (ISO 8601), or null."
                },
                "venceEm": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Date and time (ISO 8601), or null."
                },
                "respondeu": {
                  "type": "boolean"
                },
                "receita": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "description": "In currency units (cents divided by 100); null when there is no value."
                },
                "travadoPor": {},
                "mensagem": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "roteiro",
                "cliente",
                "telefone",
                "motivo",
                "venceEm",
                "respondeu"
              ]
            }
          }
        },
        "required": [
          "resumo",
          "mensagensQueSairamHoje",
          "roteirosLigados",
          "encontrados",
          "retornos"
        ],
        "description": "Follow-ups created by the active sequences."
      },
      "RetornoRoteirosResposta": {
        "type": "object",
        "properties": {
          "recomendadosPraConta": {
            "type": "array",
            "items": {}
          },
          "roteiros": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "nicho": {},
                "titulo": {},
                "descricao": {},
                "ligado": {
                  "type": "boolean"
                },
                "intervaloDias": {},
                "avisaDiasAntes": {},
                "mensagem": {},
                "resultado": {
                  "type": "object",
                  "additionalProperties": true
                }
              },
              "required": [
                "id",
                "ligado"
              ]
            }
          },
          "comoLigar": {
            "type": "string"
          },
          "previa": {
            "type": "object",
            "properties": {
              "roteiroId": {
                "type": "string"
              },
              "seriamLembradosEm7Dias": {},
              "jaSairiamHoje": {},
              "exemplos": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "cliente": {},
                    "motivo": {},
                    "saiEm": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Date and time (ISO 8601), or null."
                    }
                  },
                  "required": [
                    "saiEm"
                  ]
                }
              },
              "mensagemDeExemplo": {},
              "tetoPorDia": {}
            },
            "required": [
              "roteiroId",
              "seriamLembradosEm7Dias",
              "jaSairiamHoje",
              "exemplos",
              "mensagemDeExemplo"
            ],
            "description": "The preview, only with `roteiro_id`."
          }
        },
        "required": [
          "recomendadosPraConta",
          "roteiros",
          "comoLigar"
        ],
        "description": "Ready-made follow-up sequences."
      },
      "ComissoesResumoResposta": {
        "type": "object",
        "properties": {
          "mes": {},
          "regrasDeComissao": {
            "type": "integer"
          },
          "regraAntiga": {
            "type": "string"
          },
          "profissionais": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true
            },
            "description": "Each professional with base, commission, paid and due, in currency units."
          },
          "semComissao": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "motivo": {
                  "type": "string"
                },
                "explicacao": {
                  "type": "string"
                },
                "quantos": {}
              },
              "required": [
                "motivo",
                "explicacao"
              ]
            }
          },
          "repasses": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {},
                "staffId": {},
                "total": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "description": "In currency units (cents divided by 100); null when there is no value."
                },
                "pagoEm": {},
                "lancadoNoCaixa": {
                  "type": "boolean"
                }
              },
              "required": [
                "lancadoNoCaixa"
              ]
            }
          },
          "linhas": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true
            }
          },
          "comoPagar": {
            "type": "string"
          }
        },
        "required": [
          "mes",
          "regrasDeComissao",
          "profissionais",
          "semComissao",
          "repasses",
          "comoPagar"
        ],
        "description": "Commissions for the month."
      },
      "PetsListarResposta": {
        "type": "object",
        "properties": {
          "totalDePets": {
            "type": "integer"
          },
          "encontrados": {
            "type": "integer",
            "description": "How many matched the filters, before the limit."
          },
          "tutores": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "contatoId": {
                  "type": "string"
                },
                "tutor": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "telefone": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "pets": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "nome": {
                        "type": "string"
                      },
                      "faleceu": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "nome"
                    ]
                  }
                }
              },
              "required": [
                "contatoId",
                "tutor",
                "telefone",
                "pets"
              ]
            }
          }
        },
        "required": [
          "totalDePets",
          "encontrados",
          "tutores"
        ],
        "description": "Pets and their owners."
      },
      "PetProntuarioLerResposta": {
        "type": "object",
        "properties": {
          "pet": {
            "type": "string"
          },
          "contatoId": {
            "type": "string"
          },
          "prontuarioExiste": {
            "type": "boolean"
          },
          "faleceu": {
            "type": "boolean"
          },
          "ficha": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": true
          },
          "pesoAtual": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "kg": {},
              "data": {}
            }
          },
          "pesos": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "data": {},
                "kg": {}
              }
            }
          },
          "aplicacoes": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true
            },
            "description": "Vaccines and parasite treatments given, most recent first."
          },
          "proximasDoses": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true
            }
          },
          "totalDeAtendimentos": {
            "type": "integer"
          },
          "atendimentos": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true
            }
          },
          "documentos": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {},
                "tipo": {},
                "emitidoEm": {},
                "saiuProTutor": {
                  "type": "boolean"
                }
              },
              "required": [
                "saiuProTutor"
              ]
            }
          }
        },
        "required": [
          "pet",
          "contatoId",
          "prontuarioExiste",
          "ficha",
          "pesoAtual",
          "pesos",
          "aplicacoes",
          "proximasDoses",
          "totalDeAtendimentos",
          "atendimentos",
          "documentos"
        ],
        "description": "A pet's medical record."
      },
      "PetVacinasProximasResposta": {
        "type": "object",
        "properties": {
          "janelaDias": {
            "type": "integer"
          },
          "atrasadas": {
            "type": "integer"
          },
          "encontradas": {
            "type": "integer",
            "description": "How many matched the filters, before the limit."
          },
          "doses": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "contatoId": {
                  "type": "string"
                },
                "pet": {
                  "type": "string"
                },
                "nome": {},
                "tipo": {},
                "dose": {},
                "vence": {},
                "diasParaVencer": {
                  "type": "number",
                  "description": "Negative when already overdue."
                },
                "situacao": {},
                "ultimaAplicacao": {},
                "tutor": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "telefone": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "contatoId",
                "pet",
                "diasParaVencer",
                "ultimaAplicacao",
                "tutor",
                "telefone"
              ]
            }
          },
          "aviso": {
            "type": "string",
            "description": "Plain-text notice to show the owner."
          }
        },
        "required": [
          "janelaDias",
          "atrasadas",
          "encontradas",
          "doses",
          "aviso"
        ],
        "description": "Upcoming pet doses, most overdue first."
      },
      "ImoveisListarResposta": {
        "type": "object",
        "properties": {
          "painel": {
            "description": "The listing dashboard."
          },
          "totalNaCarteira": {
            "type": "integer"
          },
          "encontrados": {
            "type": "integer",
            "description": "How many matched the filters, before the limit."
          },
          "imoveis": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "Record id, to use in the other tools."
                },
                "codigo": {},
                "titulo": {},
                "tipo": {},
                "transacao": {},
                "situacao": {},
                "precoVenda": {},
                "precoAluguel": {},
                "bairro": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "cidade": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "quartos": {},
                "vagas": {},
                "areaUtil": {},
                "fotos": {
                  "type": "integer",
                  "description": "How many photos."
                },
                "nosPortais": {
                  "type": "boolean"
                },
                "naVitrine": {
                  "type": "boolean"
                },
                "faltaParaOsPortais": {
                  "type": "array",
                  "items": {}
                },
                "interessados": {},
                "visitas": {},
                "diasNoMercado": {}
              },
              "required": [
                "id",
                "precoVenda",
                "precoAluguel",
                "bairro",
                "cidade",
                "quartos",
                "vagas",
                "areaUtil",
                "fotos",
                "nosPortais",
                "naVitrine",
                "interessados",
                "visitas",
                "diasNoMercado"
              ]
            }
          }
        },
        "required": [
          "painel",
          "totalNaCarteira",
          "encontrados",
          "imoveis"
        ],
        "description": "The property listings."
      },
      "ImovelLerResposta": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Record id, to use in the other tools."
          },
          "codigo": {},
          "titulo": {},
          "tipo": {},
          "transacao": {},
          "situacao": {},
          "precoVenda": {},
          "precoAluguel": {},
          "condominio": {},
          "iptuAnual": {},
          "areaUtil": {},
          "areaTotal": {},
          "quartos": {},
          "suites": {},
          "banheiros": {},
          "vagas": {},
          "caracteristicas": {
            "type": "array",
            "items": {}
          },
          "endereco": {
            "type": "object",
            "additionalProperties": true
          },
          "descricao": {
            "type": [
              "string",
              "null"
            ]
          },
          "totalDeFotos": {
            "type": "integer"
          },
          "fotos": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Up to 20 photo URLs."
          },
          "video": {
            "type": [
              "string",
              "null"
            ]
          },
          "publicarNosPortais": {
            "type": "boolean"
          },
          "nosPortais": {
            "type": "boolean"
          },
          "naVitrine": {
            "type": "boolean"
          },
          "faltaParaOsPortais": {
            "type": "array",
            "items": {}
          },
          "interessados": {},
          "visitas": {},
          "diasNoMercado": {},
          "criadoEm": {},
          "atualizadoEm": {}
        },
        "required": [
          "id",
          "precoVenda",
          "precoAluguel",
          "condominio",
          "iptuAnual",
          "areaUtil",
          "areaTotal",
          "quartos",
          "suites",
          "banheiros",
          "vagas",
          "caracteristicas",
          "endereco",
          "descricao",
          "totalDeFotos",
          "fotos",
          "video",
          "publicarNosPortais",
          "nosPortais",
          "naVitrine",
          "faltaParaOsPortais",
          "interessados",
          "visitas",
          "diasNoMercado",
          "criadoEm",
          "atualizadoEm"
        ],
        "description": "One full property."
      },
      "ImobLeadsRoletaResposta": {
        "type": "object",
        "properties": {
          "roleta": {
            "type": "object",
            "properties": {
              "ligada": {
                "type": "boolean"
              },
              "modo": {},
              "comoDistribui": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "prazoParaAceitarMinutos": {},
              "repassaQuandoEstoura": {
                "type": "boolean"
              },
              "maxTentativas": {}
            },
            "required": [
              "ligada",
              "modo",
              "comoDistribui",
              "prazoParaAceitarMinutos",
              "repassaQuandoEstoura",
              "maxTentativas"
            ]
          },
          "faltaNaRoleta": {
            "type": "array",
            "items": {}
          },
          "corretores": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true
            },
            "description": "Agents, without phone, email or personal link."
          },
          "resumo30Dias": {
            "type": "object",
            "properties": {
              "leads": {
                "type": "integer"
              },
              "aguardando": {
                "type": "integer"
              },
              "aceitos": {
                "type": "integer"
              },
              "semCorretor": {
                "type": "integer"
              },
              "atrasados": {
                "type": "integer"
              }
            },
            "required": [
              "leads",
              "aguardando",
              "aceitos",
              "semCorretor",
              "atrasados"
            ]
          },
          "encontrados": {
            "type": "integer",
            "description": "How many matched the filters, before the limit."
          },
          "leads": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true
            }
          },
          "desempenho": {
            "type": "object",
            "properties": {
              "dias": {},
              "corretores": {},
              "totais": {}
            },
            "required": [
              "dias",
              "corretores",
              "totais"
            ]
          }
        },
        "required": [
          "roleta",
          "corretores",
          "resumo30Dias",
          "encontrados",
          "leads"
        ],
        "description": "Leads and agent rotation."
      },
      "NotasListarResposta": {
        "type": "object",
        "properties": {
          "emissor": {
            "type": "object",
            "properties": {
              "configurado": {
                "type": "boolean"
              },
              "ativo": {
                "type": "boolean"
              },
              "provedor": {},
              "ambiente": {},
              "falta": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "required": [
              "configurado",
              "ativo",
              "provedor",
              "ambiente"
            ]
          },
          "resumo": {
            "type": "object",
            "properties": {
              "emitidas": {
                "type": "integer"
              },
              "comErro": {
                "type": "integer"
              },
              "canceladas": {
                "type": "integer"
              },
              "rascunhos": {
                "type": "integer"
              },
              "faturado": {
                "type": [
                  "number",
                  "null"
                ],
                "description": "In currency units (cents divided by 100); null when there is no value."
              }
            },
            "required": [
              "emitidas",
              "comErro",
              "canceladas",
              "rascunhos",
              "faturado"
            ]
          },
          "encontradas": {
            "type": "integer",
            "description": "How many matched the filters, before the limit."
          },
          "notas": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "Record id, to use in the other tools."
                },
                "modelo": {
                  "type": "string",
                  "description": "`nfse`, `nfce` or `nfe`."
                },
                "situacao": {
                  "type": "string",
                  "description": "`emitida` (issued), `erro` (rejected), `cancelada` (cancelled) or `rascunho` (draft)."
                },
                "numero": {
                  "type": [
                    "string",
                    "number",
                    "null"
                  ]
                },
                "valor": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "description": "In currency units (cents divided by 100); null when there is no value."
                },
                "cliente": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "descricao": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "competencia": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "emitidaEm": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "origem": {
                  "type": "string",
                  "enum": [
                    "automatica",
                    "manual"
                  ]
                },
                "erro": {
                  "type": "string",
                  "description": "Rejection reason."
                },
                "pdf": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "modelo",
                "situacao",
                "numero",
                "valor",
                "cliente",
                "descricao",
                "competencia",
                "emitidaEm",
                "origem"
              ]
            }
          },
          "comoEmitir": {
            "type": "string"
          }
        },
        "required": [
          "emissor",
          "resumo",
          "encontradas",
          "notas",
          "comoEmitir"
        ],
        "description": "Invoices. Nothing is issued or cancelled here."
      },
      "NotaStatusResposta": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Record id, to use in the other tools."
          },
          "modelo": {
            "type": "string",
            "description": "`nfse`, `nfce` or `nfe`."
          },
          "situacao": {
            "type": "string",
            "description": "`emitida` (issued), `erro` (rejected), `cancelada` (cancelled) or `rascunho` (draft)."
          },
          "numero": {
            "type": [
              "string",
              "number",
              "null"
            ]
          },
          "valor": {
            "type": [
              "number",
              "null"
            ],
            "description": "In currency units (cents divided by 100); null when there is no value."
          },
          "cliente": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "nome": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "documento": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Customer tax id; an individual's is masked."
              },
              "email": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "nome",
              "documento",
              "email"
            ]
          },
          "descricao": {
            "type": [
              "string",
              "null"
            ]
          },
          "competencia": {
            "type": [
              "string",
              "null"
            ]
          },
          "emitidaEm": {
            "type": [
              "string",
              "null"
            ]
          },
          "origem": {
            "type": "string",
            "enum": [
              "automatica",
              "manual"
            ]
          },
          "erro": {
            "type": "string",
            "description": "Rejection reason."
          },
          "pdf": {
            "type": [
              "string",
              "null"
            ]
          },
          "explicacao": {
            "type": [
              "string",
              "null"
            ]
          },
          "chave": {
            "type": [
              "string",
              "null"
            ]
          },
          "serie": {},
          "iss": {
            "type": [
              "number",
              "null"
            ],
            "description": "In currency units (cents divided by 100); null when there is no value."
          },
          "retido": {
            "type": [
              "number",
              "null"
            ],
            "description": "In currency units (cents divided by 100); null when there is no value."
          },
          "liquido": {
            "type": [
              "number",
              "null"
            ],
            "description": "In currency units (cents divided by 100); null when there is no value."
          },
          "canceladaEm": {},
          "motivoDoCancelamento": {
            "type": [
              "string",
              "null"
            ]
          },
          "xml": {
            "type": [
              "string",
              "null"
            ]
          },
          "ambiente": {
            "type": [
              "string",
              "null"
            ]
          },
          "provedor": {
            "type": [
              "string",
              "null"
            ]
          },
          "mandadaAoCliente": {},
          "de": {
            "type": "object",
            "properties": {
              "tipo": {},
              "id": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id"
            ]
          }
        },
        "required": [
          "id",
          "modelo",
          "situacao",
          "numero",
          "valor",
          "cliente",
          "descricao",
          "competencia",
          "emitidaEm",
          "origem",
          "pdf",
          "explicacao",
          "chave",
          "serie",
          "iss",
          "retido",
          "liquido",
          "xml",
          "ambiente",
          "provedor",
          "mandadaAoCliente"
        ],
        "description": "The status of one invoice, as stored."
      },
      "ClinicaNpsResumoResposta": {
        "type": "object",
        "properties": {
          "periodoDias": {
            "type": "integer"
          },
          "nps": {
            "description": "The NPS score (-100 to 100), or null."
          },
          "pesquisasQueSairam": {},
          "respostas": {},
          "taxaDeResposta": {},
          "promotores": {},
          "neutros": {},
          "detratores": {},
          "tocaramEmAvaliarNoGoogle": {},
          "porProfissional": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "profissional": {},
                "nps": {},
                "respostas": {}
              },
              "required": [
                "profissional"
              ]
            }
          },
          "porMes": {
            "type": "array",
            "items": {}
          },
          "comentarios": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "nota": {},
                "comentario": {},
                "paciente": {},
                "em": {},
                "profissional": {}
              },
              "required": [
                "paciente",
                "em"
              ]
            }
          },
          "aviso": {
            "type": "string",
            "description": "Plain-text notice to show the owner."
          }
        },
        "required": [
          "periodoDias",
          "nps",
          "pesquisasQueSairam",
          "respostas",
          "taxaDeResposta",
          "promotores",
          "neutros",
          "detratores",
          "tocaramEmAvaliarNoGoogle",
          "porProfissional",
          "porMes",
          "comentarios"
        ],
        "description": "Post-visit survey."
      },
      "JsonRpcPedido": {
        "type": "object",
        "required": [
          "jsonrpc",
          "method"
        ],
        "properties": {
          "jsonrpc": {
            "type": "string",
            "const": "2.0"
          },
          "id": {
            "type": [
              "string",
              "integer"
            ]
          },
          "method": {
            "type": "string",
            "examples": [
              "initialize",
              "ping",
              "tools/list",
              "tools/call"
            ]
          },
          "params": {
            "type": "object",
            "additionalProperties": true
          }
        }
      },
      "JsonRpcResposta": {
        "type": "object",
        "description": "JSON-RPC 2.0 response: `result` on success, `error` when the request could not be served.",
        "required": [
          "jsonrpc",
          "id"
        ],
        "properties": {
          "jsonrpc": {
            "type": "string",
            "const": "2.0"
          },
          "id": {
            "type": [
              "string",
              "integer",
              "null"
            ]
          },
          "result": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/McpInitializeResultado"
              },
              {
                "$ref": "#/components/schemas/McpToolsListResultado"
              },
              {
                "$ref": "#/components/schemas/McpToolsCallResultado"
              },
              {
                "$ref": "#/components/schemas/McpPingResultado"
              }
            ]
          },
          "error": {
            "$ref": "#/components/schemas/JsonRpcErro"
          }
        }
      },
      "JsonRpcErro": {
        "type": "object",
        "description": "JSON-RPC 2.0 error: -32700 invalid JSON, -32600 invalid request, -32601 method not found, -32602 invalid params (unknown tool, `arguments` that is not an object).",
        "required": [
          "code",
          "message"
        ],
        "properties": {
          "code": {
            "type": "integer",
            "enum": [
              -32700,
              -32600,
              -32601,
              -32602
            ]
          },
          "message": {
            "type": "string"
          },
          "data": {}
        }
      },
      "McpInitializeResultado": {
        "type": "object",
        "description": "Result of `initialize`.",
        "required": [
          "protocolVersion",
          "capabilities",
          "serverInfo",
          "instructions"
        ],
        "properties": {
          "protocolVersion": {
            "type": "string",
            "enum": [
              "2025-11-25",
              "2025-06-18",
              "2025-03-26"
            ]
          },
          "capabilities": {
            "type": "object",
            "additionalProperties": true
          },
          "serverInfo": {
            "type": "object",
            "required": [
              "name",
              "title",
              "version"
            ],
            "properties": {
              "name": {
                "type": "string"
              },
              "title": {
                "type": "string"
              },
              "version": {
                "type": "string"
              }
            }
          },
          "instructions": {
            "type": "string"
          }
        }
      },
      "McpToolsListResultado": {
        "type": "object",
        "description": "Result of `tools/list`: the tools this key can reach, with their input schema.",
        "required": [
          "tools"
        ],
        "properties": {
          "tools": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "name",
                "title",
                "description",
                "inputSchema",
                "annotations"
              ],
              "properties": {
                "name": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "inputSchema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "annotations": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        }
      },
      "McpToolsCallResultado": {
        "type": "object",
        "description": "Result of `tools/call`. `content[0].text` carries the tool result as JSON text, in the same shape as that tool REST 200 (`<Tool>Resposta`); with `isError: true`, it carries the error message and code.",
        "required": [
          "content",
          "isError"
        ],
        "properties": {
          "content": {
            "type": "array",
            "minItems": 1,
            "items": {
              "type": "object",
              "required": [
                "type",
                "text"
              ],
              "properties": {
                "type": {
                  "type": "string",
                  "const": "text"
                },
                "text": {
                  "type": "string"
                }
              }
            }
          },
          "isError": {
            "type": "boolean"
          }
        }
      },
      "McpPingResultado": {
        "type": "object",
        "description": "Result of `ping`: an empty object.",
        "maxProperties": 0
      }
    },
    "responses": {
      "Erro400": {
        "description": "Invalid parameter or rejected request (`parametros_invalidos`, `json_invalido`, `pedido_recusado`, `operacao_invalida`, `outra_conta` and others). `Erro` shape.",
        "headers": {
          "RateLimit-Policy": {
            "$ref": "#/components/headers/RateLimitPolicy"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Erro"
            }
          }
        }
      },
      "Erro401": {
        "description": "Key missing, invalid, expired or revoked (`chave_invalida`), sent in the URL (`chave_na_url`), or belonging to an account that no longer exists (`conta_inexistente`). `Erro` shape.",
        "headers": {
          "RateLimit-Policy": {
            "$ref": "#/components/headers/RateLimitPolicy"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Erro"
            }
          }
        }
      },
      "Erro402": {
        "description": "The account cannot use the API or the feature (`plano`), or it ran out of credits (`sem_credito`). `Erro` shape.",
        "headers": {
          "RateLimit-Policy": {
            "$ref": "#/components/headers/RateLimitPolicy"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Erro"
            }
          }
        }
      },
      "Erro403": {
        "description": "Missing scope (`escopo_insuficiente`), a write the test key cannot simulate (`sandbox`), no access (`sem_acesso`, `nao_parceiro`) or no access to the requested account (`conta_sem_acesso`, `conta_fora_da_chave`). `Erro` shape.",
        "headers": {
          "RateLimit-Policy": {
            "$ref": "#/components/headers/RateLimitPolicy"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Erro"
            }
          }
        }
      },
      "Erro404": {
        "description": "Path or record not found (`rota_inexistente`, `nao_encontrado`, `conta_inexistente` and the per-tool `*_nao_encontrado` codes). `Erro` shape.",
        "headers": {
          "RateLimit-Policy": {
            "$ref": "#/components/headers/RateLimitPolicy"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Erro"
            }
          }
        }
      },
      "Erro409": {
        "description": "Conflicts with what already exists, or the owner has to confirm first (`conflito`, `horario_ocupado`, `site_existe`, `agente_ja_existe`, `precisa_confirmar`, `agendamento_cancelado`, `meta_nao_conectada`, `meta_reconectar`, `google_nao_conectado`, `google_sem_perfil`). `Erro` shape.",
        "headers": {
          "RateLimit-Policy": {
            "$ref": "#/components/headers/RateLimitPolicy"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Erro"
            }
          }
        }
      },
      "Erro413": {
        "description": "Body over 1 MB (`corpo_grande`). `Erro` shape.",
        "headers": {
          "RateLimit-Policy": {
            "$ref": "#/components/headers/RateLimitPolicy"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Erro"
            }
          }
        }
      },
      "Erro423": {
        "description": "The knowledge base of this account is locked with a PIN (`cerebro_trancado`): the owner unlocks it in the app. `Erro` shape.",
        "headers": {
          "RateLimit-Policy": {
            "$ref": "#/components/headers/RateLimitPolicy"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Erro"
            }
          }
        }
      },
      "Erro429": {
        "description": "Per-minute key limit (`limite`, with `Retry-After`), a per-tool limit (`limite`) or the daily account quota (`limite_diario`). `Erro` shape.",
        "headers": {
          "RateLimit-Policy": {
            "$ref": "#/components/headers/RateLimitPolicy"
          },
          "Retry-After": {
            "$ref": "#/components/headers/RetryAfter"
          },
          "RateLimit": {
            "$ref": "#/components/headers/RateLimit"
          },
          "X-RateLimit-Limit": {
            "$ref": "#/components/headers/RateLimitLimit"
          },
          "X-RateLimit-Remaining": {
            "$ref": "#/components/headers/RateLimitRemaining"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Erro"
            }
          }
        }
      },
      "Erro500": {
        "description": "Failure on our side (`falha_interna`). Try again. `Erro` shape.",
        "headers": {
          "RateLimit-Policy": {
            "$ref": "#/components/headers/RateLimitPolicy"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Erro"
            }
          }
        }
      },
      "Erro502": {
        "description": "A service the operation depends on did not answer (`falha`, `falha_de_acesso`, `meta_falhou`, `google_falhou`). Try again. `Erro` shape.",
        "headers": {
          "RateLimit-Policy": {
            "$ref": "#/components/headers/RateLimitPolicy"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Erro"
            }
          }
        }
      },
      "Erro503": {
        "description": "Unavailable right now (`indisponivel`, `nao_configurado`, `google_nao_liberado`). Try again. `Erro` shape.",
        "headers": {
          "RateLimit-Policy": {
            "$ref": "#/components/headers/RateLimitPolicy"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Erro"
            }
          }
        }
      },
      "ErroPadrao": {
        "description": "Any other error, in the same `Erro` shape.",
        "headers": {
          "RateLimit-Policy": {
            "$ref": "#/components/headers/RateLimitPolicy"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Erro"
            }
          }
        }
      },
      "ErroMcp400": {
        "description": "Protocol error: invalid JSON (-32700), invalid message or batch (-32600) or an unsupported `MCP-Protocol-Version`, as a `JsonRpcResposta` with `error` and a null `id`. Before reaching MCP, the server may also reject a `customerUid` of another account with a 400 in the `Erro` shape (`outra_conta`).",
        "headers": {
          "RateLimit-Policy": {
            "$ref": "#/components/headers/RateLimitPolicy"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/JsonRpcResposta"
                },
                {
                  "$ref": "#/components/schemas/Erro"
                }
              ]
            }
          }
        }
      },
      "ErroMcp401": {
        "description": "Key missing, invalid, expired or revoked (`chave_invalida`) or sent in the URL (`chave_na_url`), in the `Erro` shape. Without a key, `WWW-Authenticate` carries the OAuth metadata.",
        "headers": {
          "RateLimit-Policy": {
            "$ref": "#/components/headers/RateLimitPolicy"
          },
          "WWW-Authenticate": {
            "$ref": "#/components/headers/WWWAuthenticate"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Erro"
            }
          }
        }
      }
    }
  }
}