Skip to main content
Glama

Mx Verify Tfd

mx__verify_tfd

Parse a Timbre Fiscal Digital stamp from CFDI XML and optionally verify SelloSAT against a supplied PAC certificate to confirm cryptographic validity.

Instructions

Parse a Timbre Fiscal Digital 1.1 stamp and, optionally, verify SelloSAT.

Always returns the TFD's own attributes (UUID, FechaTimbrado, RfcProvCertif, SelloCFD, NoCertificadoSAT, SelloSAT, ...) and the recomputed cadena original (via cadenaoriginal_TFD_1_1.xslt, per Anexo 20 Rubro III.B). If pac_certificado_der_b64 is supplied, additionally verifies SelloSAT (SHA-256 + RSA-PKCS#1v1.5, the same algorithm as the emisor's own Sello) against that certificate's public key. Without it, sello_sat_verified is null — parsing succeeded but cryptographic verification was not attempted, not "passed".

Returns a dict with:

  • found: False if no TimbreFiscalDigital element exists in xml

  • fields: the TFD's own attributes

  • cadena_original: the recomputed cadena original string

  • sello_sat_verified: True/False if pac_certificado_der_b64 was supplied, else null

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
xmlYesThe sealed, PAC-stamped CFDI XML (with a TimbreFiscalDigital complement)
pac_certificado_der_b64NoBase64-encoded DER certificate of the PAC/SAT that stamped this TFD, used to cryptographically verify SelloSAT. SAT does not embed this certificate in the TFD itself, so it is not available without the caller supplying it. Omit to parse fields and compute the cadena original without verifying SelloSAT.

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.3.0

TDQS

A4.5/5.0
Behavior5/5

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

With no annotations, the description fully carries the burden of behavioral disclosure. It exposes the always-returned attributes, the XSLT-based cadena original computation, the exact cryptographic algorithm (SHA-256 + RSA-PKCS#1v1.5), and the important null-vs-false semantics for `sello_sat_verified`.

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 dense but well-structured: core purpose first, then the optional verification mode, then a bulleted return dict. There is no filler; every sentence provides operational or semantic detail needed to invoke the tool correctly.

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?

Even though an output schema exists, the description usefully covers runtime behavior, the verification algorithm, the optional certificate path, and the null semantics. An agent can correctly decide whether to call this tool and know what to expect in return.

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 documents both parameters with 100% coverage, so the baseline is 3. The description reinforces the optional certificate behavior and adds the 'same algorithm as the emisor's own Sello' detail, but it does not add substantial new parameter meaning beyond what the schema already states.

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 opens with a precise verb and object: 'Parse a Timbre Fiscal Digital 1.1 stamp and, optionally, verify SelloSAT.' This clearly identifies the resource (TFD 1.1) and the tool's distinguishing verification behavior, setting it apart from the CFDI build/validate/seal sibling tools even without naming them.

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?

It provides clear conditional usage guidance: supply `pac_certificado_der_b64` to verify SelloSAT, or omit it to parse fields and compute the cadena original without verification. It also clarifies that a null `sello_sat_verified` means verification was not attempted, not that it failed. It stops short of explicitly naming alternatives or exclusions.

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/cmendezs/mcp-cfdi-mx'

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