Skip to main content
Glama

Leer un comprobante electrónico de Costa Rica

leer_comprobante
Read-onlyIdempotent

Lee un comprobante electrónico de Costa Rica en XML (factura electrónica, tiquete, nota de crédito, nota de débito, factura de compra, factura de exportación, recibo de pago, o un MensajeHacienda o MensajeReceptor) y devuelve emisor, receptor, la clave de 50 dígitos decodificada (país, fecha, cédula, consecutivo, situación, código de seguridad), las líneas con código CABYS, impuestos con su código y tarifa de IVA, totales, y una revisión de inconsistencias de formato y cálculo según los Anexos y Estructuras v4.4 de Hacienda. También decodifica una clave de 50 dígitos sola. Úsela cuando el usuario comparta un XML de factura electrónica o pregunte qué dice, si está bien hecha o por qué la rechazaron.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "leer_comprobante"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlNoEnlace https directo al archivo XML.
xmlNoEl XML completo del comprobante, como texto (también acepta el XML en base64).
claveNoSolo una clave numérica de 50 dígitos, para decodificarla sin el XML.
archivoNoArchivo XML adjunto en el chat.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Because annotations only cover safety (readOnly, idempotent, non-destructive, closed-world), the description carries the burden of explaining behavior, and it does so: it lists the returned fields (emisor, receptor, decoded 50-digit clave components, lines with CABYS, taxes with IVA codes/rates, totals) and discloses that it performs a format/calculation inconsistency review against Anexos y Estructuras v4.4. The double mode (full XML vs. standalone clave) is clearly explained.

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 text is front-loaded, giving purpose, then scope, then output, then usage in a logical order. The long enumerations of document types and returned fields are dense but carry real information; nothing is padding.

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?

There is no output schema, so the description must cover return values, and it does so in detail, including the decoded clave structure and the validation review. Inputs are fully covered by the schema, so nothing an agent needs in order to call the tool correctly is missing.

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?

Schema description coverage is 100%: url, xml (text or base64), clave, and the nested archivo object are all documented in the schema, so the baseline is 3. The description only indirectly adds that clave can be used alone without the XML, which is useful but marginal 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 names a specific verb (lee/decodifica) and resource (comprobante electrónico de Costa Rica en XML), and enumerates the supported document types (factura electrónica, tiquete, nota de crédito/débito, factura de compra/exportación, recibo de pago, MensajeHacienda/MensajeReceptor). This is unmistakably distinct from the sibling tools, which deal with CABYS lookup, taxpayer queries, Hacienda responses, and cédula validation.

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 states explicitly when to invoke it: when the user shares an electronic invoice XML, asks what it says, whether it is correct, or why it was rejected. Those triggers are concrete. It stops short of naming an alternative for adjacent cases, so it is not a 5.

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