Skip to main content
Glama

Validar un CFDI

verificar_factura

Valida un CFDI: XSD oficial del Anexo 20 y estado en vivo ante el SAT, con cruce 69-B del emisor. Envia el XML del CFDI en 'xml'. Consume saldo (servicio CFDI; tarifa vigente en consultar_precios).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
xmlYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
camposNo
sandboxNo
serviceNo
retencionNo
constanciaNo
consultadoNo
emisor_69bNo
estado_satNo
xml_sha256No
result_codeNo
engine_versionNo
validacion_xsdNo
verification_idNo
estructura_anexo20No
validaciones_formatoNo
validacion_aritmeticaNo
duplicado_en_organizacionNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "description": "factura_verificar — 1 muestra(s), 17 campos.",
      +  "properties": {
      +    "campos": {
      +      "anyOf": [
      +        {},
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "default": null,
      +      "title": "Campos"
      +    },
      +    "constancia": {
      +      "anyOf": [
      +        {},
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "default": null,
      +      "title": "Constancia"
      +    },
      +    "consultado": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "default": null,
      +      "title": "Consultado"
      +    },
      +    "duplicado_en_organizacion": {
      +      "anyOf": [
      +        {
      +          "type": "boolean"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "default": null,
      +      "title": "Duplicado En Organizacion"
      +    },
      +    "emisor_69b": {
      +      "anyOf": [
      +        {},
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "default": null,
      +      "title": "Emisor 69B"
      +    },
      +    "engine_version": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "default": null,
      +      "title": "Engine Version"
      +    },
      +    "estado_sat": {
      +      "anyOf": [
      +        {},
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "default": null,
      +      "title": "Estado Sat"
      +    },
      +    "estructura_anexo20": {
      +      "anyOf": [
      +        {},
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "default": null,
      +      "title": "Estructura Anexo20"
      +    },
      +    "result_code": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "default": null,
      +      "title": "Result Code"
      +    },
      +    "retencion": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "default": null,
      +      "title": "Retencion"
      +    },
      +    "sandbox": {
      +      "anyOf": [
      +        {
      +          "type": "boolean"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "default": null,
      +      "title": "Sandbox"
      +    },
      +    "service": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "default": null,
      +      "title": "Service"
      +    },
      +    "validacion_aritmetica": {
      +      "anyOf": [
      +        {},
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "default": null,
      +      "title": "Validacion Aritmetica"
      +    },
      +    "validacion_xsd": {
      +      "anyOf": [
      +        {},
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "default": null,
      +      "title": "Validacion Xsd"
      +    },
      +    "validaciones_formato": {
      +      "anyOf": [
      +        {},
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "default": null,
      +      "title": "Validaciones Formato"
      +    },
      +    "verification_id": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "default": null,
      +      "title": "Verification Id"
      +    },
      +    "xml_sha256": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "default": null,
      +      "title": "Xml Sha256"
      +    }
      +  },
      +  "title": "RFacturaVerificar",
      +  "type": "object"
      +}
  2. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Beyond the annotations (readOnlyHint=false), the description discloses that this call consumes balance and points to consultar_precios for the rate, which is essential behavioral information for an agent to obtain user consent. It also reveals that validation happens against live SAT status, implying a real-time external dependency.

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 carry the entire payload: purpose, detailed scope, parameter mapping, and cost indicator. The most important information is front-loaded, with no filler or repetition of schema fields.

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?

For a tool with one required parameter and an output schema, the description covers invocation, validation logic, and financial implication. The only marginal gap is the exact XML representation, but the presence of an output schema means the agent can infer the expected response format.

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 0% and the parameter name 'xml' alone is ambiguous; the description fills the gap by explicitly stating 'Envia el XML del CFDI en ''xml'''. It still does not specify representation details like raw XML string vs base64, but it supplies the core semantic that the schema lacks.

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 specific verb and object ('Valida un CFDI') and immediately specifies what validation entails: XSD against Anexo 20, live SAT status, and 69-B cross-check. This distinguishes it from sibling validators like validar_rfc or validar_constancia without needing to name 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 gives clear operational context: the agent should send the CFDI XML in the 'xml' parameter, and it warns that this is a paid service whose current rate is listed in consultar_precios. It does not explicitly contrast against overlapping siblings like verificacion_completa or verificar_pago, but the use case is unmistakable.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources