Skip to main content
Glama

br__submit_nfe

Submit a signed Brazilian NF-e/NFC-e to SEFAZ for authorization. Returns authorization protocol (nProt) on success.

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
id_loteYesIdentificador do lote (idLote), até 15 dígitos
cert_pathYesCaminho local para o certificado ICP-Brasil A1 (.p12/.pfx)
xml_contentNoXML NF-e/NFC-e assinado (saída de br__sign_nfe). Informe xml_content ou xml_base64.
xml_base64NoXML NF-e/NFC-e assinado, codificado em base64.
tp_ambNoIdentificação do Ambiente (tpAmb): '1' = produção, '2' = homologação2
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

Behavior4/5

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

The description discloses key behavioral traits: synchrony, irreversibility in production, required two-step confirmation via ConfirmationGate, and the ability to disable with BR_READ_ONLY. Without annotations, it provides sufficient behavioral context, though rate limits or detailed authentication flows are not covered.

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 concise: a single-sentence purpose followed by a brief paragraph on important caveats. No redundant or filler content; front-loaded with the key action.

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 of SEFAZ submission (irreversible, two-step confirmation), the description covers purpose, input, output, and critical warnings. Output schema exists but is not detailed here; however, the description mentions protNFe and error, which is sufficient for an agent. Sibling tools contextualize the workflow.

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 value by linking xml_content to br__sign_nfe output and explaining confirmation_token as from a previous pending call. This extra context aids proper parameter use beyond the schema 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 submits signed NF-e/NFC-e to SEFAZ for authorization (NFeAutorizacao4, synchronous). It distinguishes from sibling tools like br__sign_nfe (signing) and br__consult_sefaz_status (consultation), making its role unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description warns about irreversibility and the two-step confirmation gate, but does not explicitly state when to use this tool versus alternatives like br__consult_sefaz_status or br__distribute_dfe. The mention of BR_READ_ONLY to disable provides a conditional usage hint, but lacks direct comparison to siblings.

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