Skip to main content
Glama

br__sign_nfse

Sign an unsigned DPS (Documento de Prestação de Serviços) with ICP-Brasil XML-DSig for NFS-e National, using a local A1 certificate.

Instructions

Aplicar assinatura XML-DSig ICP-Brasil ao DPS da NFS-e Nacional.

Assina o elemento <infDPS> com enveloped ds:Signature adicionada como último filho de <DPS>, usando mcp_nfe_br.standards.nfse_signer.build_nfse_signer.

Algoritmo: RSA-SHA1 (padrão XMLDSigSigner). [Unverified para NFS-e Nacional — confirme no manual ADN antes de usar em produção.]

Somente certificados A1 (PKCS#12 em arquivo) são suportados. A3 (hardware token/HSM) [NEED: não modelado].

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cert_pathYesCaminho local para o certificado ICP-Brasil A1 (.p12/.pfx)
xml_contentNoDPS não assinado (saída de br__generate_nfse). Informe xml_content ou xml_base64.
xml_base64NoDPS não assinado codificado em base64.
cert_passwordNoSenha do certificado A1, se houver

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 provided, the description carries full burden. It discloses the algorithm (RSA-SHA1), signature placement (as last child of <DPS>), and return structure (dict with xml or error). It does not explicitly mention whether the tool is read-only or destructive, but signing is inherently a write operation. The details are sufficient for an agent to understand behavior.

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 well-structured with a clear opening sentence, followed by technical details and caveats. It is not overly verbose, though the bracketed notes (e.g., `[Unverified...]`, `[NEED: não modelado]`) add slight clutter. Still, every sentence contributes meaning.

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 tool's complexity (signing XML with certificate), the description covers essential aspects: algorithm, supported certificate types, input format, and return value. It references a sibling tool for input, acknowledges verification status, and provides enough context for an agent to use it correctly. The presence of an output schema reduces the need for detailed return value documentation.

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 parameters are already documented. The description adds value by noting that cert_path is a local file path, xml_content typically comes from br__generate_nfse, and cert_password is optional. This contextualizes the parameters beyond 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 the tool applies an XML-DSig ICP-Brasil signature to the DPS element of NFS-e Nacional. It specifies the exact element (<infDPS>), signature type (enveloped ds:Signature), and library used. This distinguishes it from sibling tools like br__sign_nfe and br__generate_nfse.

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

Usage Guidelines5/5

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

The description explicitly states that only A1 certificates (PKCS#12 files) are supported, and A3 hardware tokens are not modeled. It also includes a warning that the tool is unverified for production, guiding cautious use. The input reference to br__generate_nfse provides context for the expected xml_content.

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