Skip to main content
Glama

br__sign_nfe

Sign NF-e/NFC-e XML documents with ICP-Brasil certificates using enveloped XML-DSig signature, complying with MOC 7.0 requirements.

Instructions

Apply an ICP-Brasil enveloped XML-DSig signature to an NF-e/NFC-e XML.

Signs <infNFe> per MOC 7.0 Table 4-2 (RSA-SHA1 / SHA-1, enveloped transform, ds:Signature appended as the last child of <NFe>) using mcp_nfe_br.standards.nfe_signer.build_nfe_signer.

Only ICP-Brasil A1 (PKCS#12 file-based) certificates are supported. A3 (hardware token/HSM) certificates [NEED: not modeled].

Returns a dict with xml (the signed document) or error.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cert_pathYesCaminho local para o certificado ICP-Brasil A1 (.p12/.pfx)
xml_contentNoXML NF-e/NFC-e não assinado. Informe xml_content ou xml_base64.
xml_base64NoXML NF-e/NFC-e não assinado, codificado em base64.
cert_passwordNoSenha do certificado A1, se houver

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

No annotations are provided, so the description carries full burden. It discloses detailed behavior: signing algorithm (RSA-SHA1, enveloped transform), placement (last child of <NFe>), and supported certificate types (A1 only, A3 not modeled). It also specifies return format (dict with xml or error).

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, front-loaded with the action, and includes necessary technical details without extraneous information. Every sentence adds value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of the signing operation and the presence of an output schema (implied by 'returns a dict with xml or error'), the description is complete. It covers the signing process, certificate limitations, and return format, leaving no major gaps considering the sibling tools are distinct operations.

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 baseline is 3. The description does not significantly add parameter-specific meaning beyond the schema; it provides overall context about signing and certificate support, but the parameters (cert_path, xml_content, xml_base64, cert_password) are adequately described in the schema.

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 it applies an ICP-Brasil enveloped XML-DSig signature to an NF-e/NFC-e XML, specifying that it signs <infNFe> per MOC 7.0 Table 4-2. This distinguishes it from sibling tools like br__validate_nfe_xml or br__generate_nfe, which perform other operations.

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 implies usage for signing NF-e/NFC-e XML and specifies supported certificate types (only ICP-Brasil A1). It does not explicitly state when not to use or provide alternatives, but the context is clear enough given the distinct operation from 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