Skip to main content
Glama
nikolasdehor

mcp-fiscal-brasil

by nikolasdehor

validar_assinatura_nfe

Validate the digital signature of an NF-e XML, ensuring integrity of DigestValue and certificate signature. Extract certificate details and optionally verify ICP-Brasil trust chain.

Instructions

Valida a assinatura digital XMLDSig de uma NF-e. Verifica a integridade do DigestValue e a assinatura criptografica do certificado. Extrai dados do certificado assinante: titular, CNPJ/CPF, validade e autoridade certificadora. Opcional: informe um CA bundle PEM para validar a cadeia de confianca ICP-Brasil.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ca_bundleNoOpcional. Conteudo PEM (nao o caminho, mas o PEM em si) com a cadeia ICP-Brasil para validar o emissor do certificado.
xml_contentYesConteudo XML da NF-e como string. Validado contra XXE (parse_xml).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

Despite no annotations, the description discloses key behaviors: validation of DigestValue and cryptographic signature, extraction of certificate data (titular, CNPJ/CPF, validade, AC), and optional chain validation. It implies read-only safe operation. No destructive or authorization details are missing, but could mention error handling.

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?

Two sentences, no waste. First sentence states core functionality, second lists extracted data and optional parameter. Front-loaded and easy to parse.

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 that an output schema exists, the description need not detail return values. However, it does not address edge cases like invalid XML, malformed signature, or certificate errors. The tool's behavior in failure modes is implied but not explicit, leaving some gaps for an AI agent.

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%, but the description adds value beyond the schema: it notes that xml_content is validated against XXE (parse_xml) and clarifies ca_bundle is PEM content, not a file path. This security context and usage detail improve parameter understanding.

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?

Description clearly states it validates the XMLDSig signature of an NF-e, checks DigestValue integrity and cryptographic signature, and extracts certificate data. This specific verb-resource combination distinguishes it from sibling tools like 'validar_chave_nfe' or 'validate_nfe_full'.

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?

No explicit guidance on when to use this tool vs. alternatives like 'validate_nfe_full'. It mentions optional CA bundle for chain validation but does not specify prerequisites, error conditions, or scenarios where this tool is preferred over others.

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/nikolasdehor/mcp-fiscal-brasil'

If you have feedback or need assistance with the MCP directory API, please join our Discord server