Skip to main content
Glama

Consultar NFS-e por chave

consultar_nfse

Consulta UMA NFS-e do padrão nacional pela chave de acesso de 50 dígitos, sem certificado digital: emitente, tomador, serviço, tributação municipal e federal e situação de geração (situacao não indica cancelamento). Uma consulta nova leva de 30 a 60 segundos. O PDF do DANFSe não vem por aqui. Custo por nota, descontado do saldo em créditos (1 crédito = R$ 1): Starter R$ 0,30 (R$ 0,36 com créditos extras); Pro R$ 0,195 (R$ 0,255); Enterprise R$ 0,05 (R$ 0,05). Cobra só a NFS-e entregue; chave inválida, nota não encontrada e erro não são cobrados. 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": {
      "chave": "<chave>"
    },
    "name": "consultar_nfse"
  }
}

Input Schema

NameRequiredDescriptionDefault
chaveYesChave de acesso da NFS-e (50 dígitos); separadores são ignorados.
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. Added

TDQS

A4.6/5.0
Behavior5/5

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

No annotations are supplied, so the description carries the full disclosure burden and does so: 30–60 second latency for a fresh query, no certificate requirement, a warning that 'situação' does not signal cancellation, and confirmation that the DANFSe PDF is not returned. It also discloses the billing model in detail, including per-tier prices and that invalid keys, missing notes, and errors are not charged.

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 definition is front-loaded with what is retrieved and what is not, then latency, then cost. The pricing enumeration is dense and repetitive across the three tiers, but each clause is decision-relevant for an agent that must obtain user consent before spending credits.

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?

Return values are covered by the output schema, so the description need not re-explain them. For a paid, slow, credential-free single-record lookup, everything an agent needs before calling—cost, consent gate, latency, scope limitations—is present.

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, but the description adds real meaning to 'confirmo_custo' by explaining the actual monetary consequence the confirmation accepts and that the call is charged only on delivery. It adds little to 'chave' beyond the schema's own 50-digit note.

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?

The description states a specific verb and resource ('Consulta UMA NFS-e do padrão nacional pela chave de acesso de 50 dígitos') and scopes it tightly to a single note. It also explicitly excludes adjacent capabilities ('O PDF do DANFSe não vem por aqui'), which separates it from document-download siblings.

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 makes the invocation conditions concrete: a 50-digit key, no digital certificate required, and a plan or extra credits needed because the free monthly queries do not work through MCP. It does not name a sibling alternative for fetching the DANFSe PDF, so the when-not guidance is implied rather than routed.

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.