Skip to main content
Glama

Br Submit Nfe

br__submit_nfe

Submit a signed NF-e/NFC-e XML to SEFAZ for authorization and receive the authorization protocol (nProt). Production submissions require two-step confirmation.

Instructions

Submete um NF-e/NFC-e assinado à autorização SEFAZ (NFeAutorizacao4, síncrono).

Submissão para SEFAZ é uma operação irreversível em produção e exige confirmação em duas etapas (ConfirmationGate). Define BR_READ_ONLY=1 para desabilitar esta ferramenta.

Retorna protNFe (incluindo nProt, o protocolo de autorização) em caso de sucesso, ou error.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
c_ufYesCódigo IBGE da UF do autorizador (cUF), 2 dígitos
tp_ambNoIdentificação do Ambiente (tpAmb): '1' = produção, '2' = homologação2
id_loteYesIdentificador do lote (idLote), até 15 dígitos
cert_pathYesCaminho local para o certificado ICP-Brasil A1 (.p12/.pfx)
xml_base64NoXML NF-e/NFC-e assinado, codificado em base64.
xml_contentNoXML NF-e/NFC-e assinado (saída de br__sign_nfe). Informe xml_content ou xml_base64.
cert_passwordNoSenha do certificado A1, se houver
endpoint_overrideNoURL completa do webservice NFeAutorizacao4 (sobrepõe a tabela de roteamento por UF)
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.4/5.0
Behavior5/5

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

With no annotations provided, the description carries the full behavioral disclosure burden and does so well. It discloses that the operation is irreversible in production, requires two-step confirmation, is synchronous, and returns protNFe or an error. It even mentions how to disable the tool via BR_READ_ONLY=1.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is compact and front-loaded: the core action appears first, followed by critical safety/confirmation facts, then the return value. Every sentence earns its place with no redundant content.

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?

The description covers purpose, synchronization, irreversibility, confirmation requirement, disable mechanism, and return value, which is strong for a 9-parameter tool with a rich output schema. It could be more explicit about the practical two-step confirmation flow, such as what the first call returns and how the confirmation_token is used, though the schema partially covers this.

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 all parameters thoroughly. The description adds context about the signed input and two-step confirmation but does not materially add meaning to individual parameters beyond what the schema provides.

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: it submits a signed NF-e/NFC-e to SEFAZ authorization via NFeAutorizacao4 synchronously. This clearly distinguishes it from sibling tools like br__submit_nfse and br__submit_cte, which target different document types.

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 clear context: the input must be a signed NF-e/NFC-e and the operation is synchronous. It explicitly warns that submission is irreversible and requires two-step confirmation, which informs when the tool should be invoked, though it does not explicitly name alternative tools or list exclusion conditions.

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