Skip to main content
Glama

FiscalAPI

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: 1 consulta do saldo (Lite R$ 0,67; Starter R$ 0,10 (recarga R$ 0,12); Pro R$ 0,065 (recarga R$ 0,07); Enterprise R$ 0,025 (recarga R$ 0,02)); com ao_vivo=true, 3 consultas (Lite R$ 2,01; Starter R$ 0,30 (recarga R$ 0,36); Pro R$ 0,195 (recarga R$ 0,21); Enterprise R$ 0,075 (recarga R$ 0,06)). Erro não é cobrado. Resposta sem inscrição encontrada, sem_certidao ou nao_contribuinte conta como consulta. Conta que nunca assinou, com e-mail confirmado e sem recarga, tem 10 consultas grátis por mês de IE em um estado e de CNPJ. A consulta ao vivo não entra nas grátis.

Input Schema

NameRequiredDescriptionDefault
cnpjYesCNPJ, com ou sem pontuação.
ao_vivoNoConsulta a Receita Federal na hora, ignorando o cache. Custa 3 consultas.
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. First observed

TDQS

A4.2/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 thoroughly: exact per-plan cost in consultas, 3x cost for ao_vivo, errors not charged, and which 'not found' style responses still count as a paid consulta. It also discloses that live queries never hit the cache and are excluded from the 10 free monthly consultas, which an agent needs before invoking.

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

Conciseness3/5

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

Purpose is front-loaded in one strong sentence, but the cost section dumps eight price points with per-plan recharge variants inline, which is dense and hard to scan. The pricing could be summarized or deferred, so several phrases do not earn their place in the description body.

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

Completeness5/5

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

For a paid, gated lookup with an output schema, everything an agent needs is present: cost, billing edge cases, free-tier rules, live-mode tradeoffs, and the confirmation requirement. The enumerated return fields are partly redundant with the output schema but reinforce what the call yields.

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; however the description adds real meaning beyond the schema by explaining the consequence of ao_vivo (Simples and MEI return empty) and by reinforcing the cost multiplier attached to it. The cnpj parameter's punctuation tolerance and the confirmo_custo gate are only in the schema, but that is acceptable given full coverage.

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

Purpose4/5

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

States a specific verb (consulta) and resource (cadastro público de CNPJ na Receita Federal), then enumerates the returned fields (razão social, situação cadastral, CNAE, quadro societário, Simples/MEI). The resource makes it naturally distinct from CND/IE siblings, but no sibling is named explicitly as an alternative, so it stops short of a 5.

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 clear context for the key decision: when to use ao_vivo=true (fresh from Receita Federal, slower, Simples/MEI come back empty) versus the cached default. It also explains the cost model and that errors/empty responses have different billing treatment. It does not route the agent away from this tool toward a sibling (e.g., consultar_ie for state registration), so no explicit exclusions.

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.