Skip to main content
Glama

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ó). Para CPF, a Receita exige a data de nascimento do titular (data_nascimento). 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 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). 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

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "consultar_cnd_federal"
  }
}

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.
data_nascimentoNoData de nascimento do titular, obrigatória para CPF (DD/MM/AAAA ou AAAA-MM-DD).

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / data_nascimento
      Added value: +{
      +  "anyOf": [
      +    {
      +      "maxLength": 10,
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Data de nascimento do titular, obrigatória para CPF (DD/MM/AAAA ou AAAA-MM-DD).",
      +  "title": "Data Nascimento"
      +}
  2. 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, the description carries the full burden and does so: it discloses the 3-day reuse behavior, the cost table per plan with extra-credit pricing, that errors and no-certificate/nao_contribuinte responses are still billed as a query, and that the PDF is not delivered through the MCP. That is exactly the billing and gating context an agent needs before spending credits.

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?

Purpose, document rule and mode logic are front-loaded, with billing details and the free-tier caveat trailing. The pricing sentence is dense with per-plan figures but each figure is decision-relevant; only minor trimming is possible.

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?

Despite a five-parameter tool with cost gating, the description covers the caching rule, the cost confirmation gate, billing exceptions, credit requirements and the absence of PDF output; return fields are additionally backed by an output schema. An agent can decide, confirm and call it without further information.

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 explains cpf, cnpj, emitir_nova, confirmo_custo and data_nascimento individually. The description only reinforces the 'one document only' constraint and the CPF birth-date requirement, adding little meaning beyond the structured fields, so the baseline 3 applies.

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: it consults the federal tax-debt certificate covering Receita Federal and PGFN for exactly one CPF or CNPJ. The word 'federal' plus the named issuing bodies distinguish it from the estadual, CNDT and FGTS siblings without their schemas being opened.

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?

It gives clear when-to-use rules: an existing certificate valid for more than 3 days is returned in modo=consulta, otherwise a new one is issued in modo=emissao, and emitir_nova=true forces emission. It also states the CPF prerequisite (data_nascimento) and that a plan or extra credits are required because the 10 free monthly queries do not apply over MCP. It does not explicitly name a sibling alternative, which keeps it below a 5.

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.