Skip to main content
Glama

FiscalAPI

Consultar CND Federal

consultar_cnd_federal

Consulta a certidão de débitos de tributos federais e Dívida Ativa da União (Receita Federal e PGFN) de um CPF ou CNPJ (um só). Se já existe certidão que vale por mais de 3 dias, devolve essa (modo=consulta); senão, emite uma nova (modo=emissao). Com emitir_nova=true, emite sempre. Devolve status, emissão, validade e protocolo. O PDF não vem pelo MCP. 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)). Erro não é cobrado. Resposta sem inscrição encontrada, sem_certidao ou nao_contribuinte conta como consulta.

Input Schema

NameRequiredDescriptionDefault
cpfNoCPF, com ou sem pontuação (informe só um documento).
cnpjNoCNPJ, com ou sem pontuação (informe só um documento).
emitir_novaNoEmite uma certidão nova mesmo que já exista uma válida.
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.4/5.0
Behavior5/5

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

With no annotations supplied, the description carries the full burden and does so: it discloses the caching rule, the cost per plan tier, that errors are not charged, that certain negative responses still count as a billable consultation, and that the PDF is not delivered through the MCP. These are exactly the behavioral traits an agent needs before invoking a paid operation.

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?

Front-loaded with what the tool does and the consulta/emissao decision, then billing and output notes. The pricing sentence is dense with tier detail but is functional information rather than filler; slightly tighter phrasing would earn a 5.

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?

Covers the operation, the reuse-vs-emit decision, the override flag, the response fields (status, emissão, validade, protocolo), the lack of PDF, and the billing model. With an output schema present and full parameter coverage, nothing an agent needs to call this correctly is missing.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents cpf, cnpj, emitir_nova and confirmo_custo, including the cost-confirmation gate. The description only reinforces the emitir_nova override, adding little meaning beyond the schema, which is the expected baseline of 3.

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 and resource: fetches the federal tax-debt certificate (Receita Federal and PGFN) for a single CPF or CNPJ. The 'federais' scope and the enumeration of the two issuing bodies make it distinguishable from consultar_cnd_estadual in the sibling list without opening either schema.

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?

Explains the internal selection logic clearly: reuse an existing certificate if it is valid for more than 3 days (modo=consulta), otherwise issue a new one (modo=emissao), and emitir_nova=true always emits. It does not explicitly state when to prefer this over consultar_cnd_estadual or the other certificate tools, so it stops short of full alternative routing.

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.