Skip to main content
Glama

Consultar CNPJ

consultar_cnpj

Consulta o cadastro público de um CNPJ na Receita Federal: razão social, situação cadastral, abertura, CNAE, endereço, telefones, e-mail, quadro societário e opção pelo Simples e pelo MEI (base mensal da Receita Federal). Com ao_vivo=true consulta a Receita Federal na hora (mais lento; Simples e MEI voltam vazios). Custo por consulta, descontado do saldo em créditos (1 crédito = R$ 1): Starter R$ 0,10 (R$ 0,12 com créditos extras); Pro R$ 0,065 (R$ 0,085); Enterprise R$ 0,025 (R$ 0,035); com ao_vivo=true, Starter R$ 0,30 (R$ 0,36 com créditos extras); Pro R$ 0,195 (R$ 0,255); Enterprise R$ 0,075 (R$ 0,105). Erro não é cobrado. Resposta sem inscrição encontrada, sem_certidao ou nao_contribuinte conta como consulta. Exige plano ou créditos extras: as 10 consultas grátis do mês são só no painel, não valem pelo MCP.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "cnpj": "<cnpj>"
    },
    "name": "consultar_cnpj"
  }
}

Input Schema

NameRequiredDescriptionDefault
cnpjYesCNPJ, com ou sem pontuação.
ao_vivoNoConsulta a Receita Federal na hora, ignorando o cache. Tem preço próprio (ver Custo).
confirmo_custoNoObrigatório para executar: true só depois que o usuário aceitou o custo descrito na ferramenta. Sem isso a ferramenta só explica o custo e não consulta nada.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / ao_vivo / description
      Previous value: -"Consulta a Receita Federal na hora, ignorando o cache. Custa 3 consultas."New value: +"Consulta a Receita Federal na hora, ignorando o cache. Tem preço próprio (ver Custo)."
  2. First observed

TDQS

A4.5/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden and does so: per-plan pricing and extra-credit surcharges, the ao_vivo price premium, 'erro não é cobrado', and the rule that 'sem inscrição encontrada', 'sem_certidao' and 'nao_contribuinte' responses still count as billable consultations. The access constraint (paid plan or extra credits; the 10 free monthly queries do not apply via MCP) is also disclosed.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose and returned fields are front-loaded, then the ao_vivo caveat, then cost. The multi-tier price enumeration (Starter/Pro/Enterprise, with and without extra credits, twice) is dense and could be compressed, but each clause is decision-relevant for a billable call.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return values need not be described, and the description covers billing, access prerequisites, live-vs-cache trade-offs and billing edge cases. Minor gaps remain, such as what validation errors look like or behavior on malformed CNPJ beyond 'erro não é cobrado'.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3; the description adds real meaning beyond it by explaining that ao_vivo bypasses cache, is slower, carries its own price, and causes Simples/MEI fields to come back empty. It also reinforces confirmo_custo as a cost-acknowledgement gate rather than a plain flag.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (consultar) and resource (cadastro público de CNPJ na Receita Federal) and enumerates the returned fields (razão social, situação cadastral, CNAE, quadro societário, Simples/MEI), which clearly separates it from the certificate-oriented siblings like consultar_cnd_federal or consultar_cndt.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives a concrete conditional: default cache lookup vs. ao_vivo=true for a live Receita Federal query, and warns that live mode is slower and returns empty Simples/MEI. It also states the plan/credit prerequisite. It stops short of naming when to prefer a sibling tool, but covers the internal choice explicitly.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.