Skip to main content
Glama

Explicar una respuesta de Hacienda

explicar_respuesta_hacienda
Read-onlyIdempotent

Explica en lenguaje sencillo la respuesta de Hacienda a un comprobante electrónico: el XML MensajeHacienda (aceptado o rechazado), el JSON de la API de recepción con ind-estado (recibido, procesando, aceptado, rechazado, error), un MensajeReceptor, o el texto del detalle de rechazo. Para rechazos indica los motivos probables y cómo corregirlos, según las reglas de validación de los Anexos v4.4. Úsela cuando el usuario pregunte por qué Hacienda rechazó una factura o qué significa una respuesta.

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": "explicar_respuesta_hacienda"
  }
}

Input Schema

NameRequiredDescriptionDefault
archivoNoArchivo XML adjunto en el chat.
respuestaNoEl XML de respuesta (clave_respuesta.xml), el JSON de la API, el base64 de respuesta-xml, o el texto del mensaje de rechazo.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare a safe, read-only, idempotent, closed-world operation, so the burden is lighter. The description adds real behavioral value by stating what the output contains: plain-language explanation, probable rejection motives, and corrections grounded in 'las reglas de validación de los Anexos v4.4' — a domain rule source the agent could not infer from structured fields.

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?

Front-loaded with the purpose in the first clause, then inputs, then the rejection-specific behavior, then the usage trigger. Dense but each clause carries information; only the trailing usage sentence slightly restates what the opening already implied.

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 2-parameter, fully documented read-only tool with no output schema, the description covers what inputs are accepted, what the explanation includes, which validation rules back the rejection analysis, and when to reach for it. Nothing an agent needs to select and call it correctly is missing.

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%, so the baseline is 3. The description still adds meaning by expanding the possible states of the `respuesta` payload (ind-estado: recibido, procesando, aceptado, rechazado, error) and by noting acceptance/rejection framing, which helps the agent recognize valid input shapes beyond the schema's terse list.

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?

States a specific verb and resource: 'Explica en lenguaje sencillo la respuesta de Hacienda a un comprobante electrónico', then enumerates the exact accepted input forms (MensajeHacienda XML, JSON de recepción con ind-estado, MensajeReceptor, texto de rechazo). This clearly separates it from siblings like leer_comprobante or validar_cedula, which read or validate rather than explain.

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?

Gives a concrete trigger: 'Úsela cuando el usuario pregunte por qué Hacienda rechazó una factura o qué significa una respuesta.' That is a clear usage context, but no explicit exclusions or named alternatives are provided for cases that fall outside these two questions.

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