Skip to main content
Glama

br__distribute_dfe

Distribute or consult Brazilian electronic invoices (DF-e) by NSU batch, specific NSU, or 44-character access key. Uses ICP-Brasil A1 certificate with optional two-step confirmation.

Instructions

Consulta/distribui DF-e via NFeDistribuicaoDFe (NT2014.002_v1.30, [Verified locally]).

Exatamente um de ult_nsu, nsu, ou ch_nfe deve ser informado, selecionando distNSU, consNSU, ou consChNFe respectivamente.

Esta ferramenta consulta dados fiscais de terceiros vinculados ao certificado e requer confirmação em duas etapas. Define BR_READ_ONLY=1 para desabilitar.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
c_uf_autorYesCódigo IBGE da UF autorizadora (cUFAutor), 2 dígitos
document_idYesCNPJ ou CPF do interessado
cert_pathYesCaminho local para o certificado ICP-Brasil A1 (.p12/.pfx)
document_id_typeNoTipo de document_id: 'CNPJ' ou 'CPF'CNPJ
tp_ambNoIdentificação do Ambiente (tpAmb): '1' = produção, '2' = homologação2
ult_nsuNodistNSU/ultNSU — último NSU recebido (modo distribuição em lote)
nsuNoconsNSU/NSU — NSU específico a consultar
ch_nfeNoconsChNFe/chNFe — chave de acesso (44 caracteres) a consultar
cert_passwordNoSenha do certificado A1, se houver
endpoint_overrideNoURL completa do webservice NFeDistribuicaoDFe (sobrepõe o endpoint do Ambiente Nacional)
confirmation_tokenNoToken de confirmação obtido de uma chamada anterior pendente.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses the two-step confirmation requirement and the option to set BR_READ_ONLY=1, indicating potential side effects. However, it does not detail idempotency, error handling, or the exact nature of the 'distribution' mode, leaving some behavioral aspects unclear.

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 description is concise with three clear sentences, each serving a purpose: identifying the operation, explaining parameter selection, and noting behavioral constraints. The technical reference (NT2014.002_v1.30) is somewhat verbose but still acceptable. No wasted words.

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?

Given the complexity (11 parameters, 100% schema coverage, output schema exists), the description adequately covers parameter logic and behavioral context. It does not explain the output schema or define DF-e, but the schema handles those details. The two-step confirmation and read-only mode are mentioned, providing sufficient operational context.

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 baseline is 3. The description adds significant value by explaining the mutual exclusivity of ult_nsu, nsu, and ch_nfe, mapping them to distNSU, consNSU, and consChNFe respectively. This clarifies the parameter selection logic beyond individual parameter descriptions.

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 clearly states the tool consults/distributes DF-e via a specific operation (NFeDistribuicaoDFe). It distinguishes from sibling tools like br__generate_nfe and br__submit_nfe, which are for different phases of the workflow.

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?

The description explains that exactly one of three parameters must be provided, determining the mode. It also mentions the two-step confirmation and read-only mode, but does not explicitly state when to use this tool versus alternatives. However, the sibling context makes the usage area clear.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/cmendezs/mcp-nfe-br'

If you have feedback or need assistance with the MCP directory API, please join our Discord server