Skip to main content
Glama

br__generate_nfe

Generate unsigned NF-e/NFC-e XML (modelo 55/65, schema 4.00). Returns the XML string, 44-character access key, and any non-fatal warnings. Requires signing before SEFAZ submission.

Instructions

Generate an unsigned NF-e/NFC-e XML (modelo 55/65, schema 4.00).

The returned <NFe><infNFe>…</infNFe></NFe> document does not include <Signature> — sign it with br__sign_nfe before SEFAZ submission. SEFAZ webservice submission itself is not implemented in this phase.

Returns a dict with:

  • xml: the generated NF-e/NFC-e XML string

  • chave_acesso: the computed 44-character access key (chNFe)

  • warnings: list of non-fatal notices

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
invoiceYesInvoice data matching the BRInvoice schema (modelo 55 = NF-e, modelo 65 = NFC-e)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

With no annotations, the description carries full burden of transparency. It discloses that the XML is unsigned, the need for signing, the exclusion of submission, and the structure of the return dict (xml, chave_acesso, warnings). Minor omission: no mention of error behavior, but overall transparent.

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 (4 lines), front-loaded with the main purpose, and every sentence adds value. No fluff or redundancy.

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 generating NF-e XML, the description covers the essential aspects: output format, access key, warnings, and the need for signing. It assumes knowledge of BRInvoice schema, which is acceptable. Could mention more about error handling or constraints, but overall complete for the context.

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% for the single parameter 'invoice', so baseline is 3. The description adds no extra information beyond the schema; it only restates 'Invoice data matching the BRInvoice schema'. No additional semantics provided.

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 generates an unsigned NF-e/NFC-e XML, specifies modelo 55/65 and schema 4.00, and distinguishes itself from siblings like br__sign_nfe and br__submit_nfe by noting that the output lacks Signature and SEFAZ submission is not included.

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 explicitly tells users to sign the output with br__sign_nfe before submission and that SEFAZ submission is not in this phase, providing clear context for when to use this tool. However, it does not explicitly compare with other siblings like br__build_access_key or list when not to use this tool.

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