Skip to main content
Glama

validar_assinatura_nfe

Validate the XMLDSig digital signature of a Brazilian NF-e, checking digest integrity and certificate signature, and extract signer details including certificate validity and optionally verify against an ICP-Brasil CA bundle.

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

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv0.5.1

TDQS

A4/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It transparently states that the tool validates the XMLDSig signature, checks DigestValue and certificate signature, extracts certificate data, and optionally validates the trust chain. It does not mention failure behavior or return format, but the core side-effect-free validation behavior is clearly described.

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 and well-structured: two sentences with no redundant fluff. It front-loads the primary purpose, then lists key validation steps and the optional chain-validation instruction, all in a compact and readable format.

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 output schema exists and the input parameters are fully described, the description is contextually complete for invoking the tool. It covers what the tool validates, what certificate data it extracts, and the optional CA bundle behavior. It could be slightly more complete by explicitly distinguishing itself from validate_nfe_full, but this is not a significant gap.

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?

The input schema already covers 100% of the parameters with meaningful descriptions: xml_content is described as NF-e XML content validated against XXE, and ca_bundle is described as PEM content rather than a file path. The main description adds no significant meaning beyond what the schema already provides.

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 identifies the tool's purpose with a specific verb and resource: 'Valida a assinatura digital XMLDSig de uma NF-e.' It then details the specific checks performed (DigestValue integrity, certificate cryptographic signature) and the data extracted, distinguishing it from broader tools like 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?

The description provides practical guidance for the optional ca_bundle parameter ('Opcional: informe um CA bundle PEM para validar a cadeia de confianca ICP-Brasil'), but it does not explicitly say when to use this tool versus alternatives such as validate_nfe_full or parse_nfe_xml. The intended usage is implied by the focus on signature validation rather than stated directly.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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/AgileConecta/RTC-MCP_FISCAL'

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