Skip to main content
Glama

Br Distribute Dfe

br__distribute_dfe

Consult and receive Brazilian DF-e tax documents from SEFAZ by informing an NSU, last NSU, or access key, keeping fiscal data up to date.

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
nsuNoconsNSU/NSU — NSU específico a consultar
ch_nfeNoconsChNFe/chNFe — chave de acesso (44 caracteres) a consultar
tp_ambNoIdentificação do Ambiente (tpAmb): '1' = produção, '2' = homologação2
ult_nsuNodistNSU/ultNSU — último NSU recebido (modo distribuição em lote)
cert_pathYesCaminho local para o certificado ICP-Brasil A1 (.p12/.pfx)
c_uf_autorYesCódigo IBGE da UF autorizadora (cUFAutor), 2 dígitos
document_idYesCNPJ ou CPF do interessado
cert_passwordNoSenha do certificado A1, se houver
document_id_typeNoTipo de document_id: 'CNPJ' ou 'CPF'CNPJ
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

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.3.1

TDQS

A4.1/5.0
Behavior3/5

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

With no annotations, the description carries the behavioral transparency burden. It discloses that the tool consults third-party fiscal data linked to the certificate, requires two-step confirmation, and mentions BR_READ_ONLY=1. However, the effect of BR_READ_ONLY is ambiguous, and it does not clarify whether the 'distribui' operation has side effects such as advancing the NSU or mutating server state.

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 compact and front-loaded with the main purpose and specification version. Each sentence adds meaningful information: mode selection and safety/behavior notes. The final BR_READ_ONLY sentence is somewhat cryptic, which prevents a perfect score for clarity.

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?

For an 11-parameter tool with an output schema and no annotations, the description covers the core operation, the mutually exclusive parameter selection, third-party data scope, and the two-step confirmation requirement. It could more fully explain the two-step flow mechanics and potential side effects of distribution, but the schema fills most remaining parameter details.

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 parameter coverage is 100%, so the baseline is 3. The description adds valuable relationship semantics beyond the schema by stating the mutual exclusivity of ult_nsu, nsu, and ch_nfe and mapping them to the corresponding service operations. This is essential for correct invocation and goes 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 states a specific action and resource: 'Consulta/distribui DF-e via NFeDistribuicaoDFe', and includes the protocol version. It further explains the three operation modes (distNSU, consNSU, consChNFe), which clearly distinguishes this tool from the NFe/NFSe/CTe 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?

The description gives explicit usage conditions: exactly one of ult_nsu, nsu, or ch_nfe must be provided, and each maps to a different operation mode. It does not explicitly name alternatives or say when not to use this tool, but the DF-e distribution scope makes the intended context reasonably clear.

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