Skip to main content
Glama
cmendezs

mcp-facturacion-electronica-es

Es Cancel Verifactu Record

es__cancel_verifactu_record

Cancel an existing invoice by generating a VERI*FACTU cancellation record (TypeHash=01) chained to the hash sequence, using original invoice details and previous hash.

Instructions

Genera un registro de anulacion VERI*FACTU (TipoHuella=01).

Encadenado a la secuencia de huellas actual.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
issuer_nifYesNIF del emisor.
issuer_nameYesNombre/razon social del emisor.
previous_hashYesHuella del ultimo registro en la cadena.
previous_fechaNoFechaExpedicionFactura del registro anterior en DD-MM-YYYY.
previous_num_serieNoNumSerieFactura del registro anterior.
previous_emisor_nifNoNIF del emisor del registro anterior (IDEmisorFactura en EncadenamientoFacturaAnteriorType).
original_invoice_dateYesFechaExpedicionFactura original (YYYY-MM-DD).
original_invoice_numberYesNumSerieFactura a anular.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed12 schema fields changedv0.8.0
    • addedInput schema / additionalProperties
      Added value: +false
    • addedInput schema / properties / previous_emisor_nif / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / previous_emisor_nif / default
      Added value: +null
    • changedInput schema / properties / previous_emisor_nif / description
      Previous value: -"NIF del emisor del registro anterior (IDEmisorFactura en EncadenamientoFacturaAnteriorType)."New value: +"NIF del emisor del registro anterior (IDEmisorFactura\nen EncadenamientoFacturaAnteriorType)."
    • removedInput schema / properties / previous_emisor_nif / type
      Removed value: -"string"
    • addedInput schema / properties / previous_fecha / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / previous_fecha / default
      Added value: +null
    • removedInput schema / properties / previous_fecha / type
      Removed value: -"string"
    • addedInput schema / properties / previous_num_serie / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / previous_num_serie / default
      Added value: +null
    • removedInput schema / properties / previous_num_serie / type
      Removed value: -"string"
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "type": "object"
      +}
  2. Changed5 schema fields changedv0.2.0
    • changedInput schema / properties / issuer_name / description
      Previous value: -"Nombre/razón social del emisor."New value: +"Nombre/razon social del emisor."
    • addedInput schema / properties / previous_emisor_nif
      Added value: +{
      +  "description": "NIF del emisor del registro anterior (IDEmisorFactura en EncadenamientoFacturaAnteriorType).",
      +  "type": "string"
      +}
    • addedInput schema / properties / previous_fecha
      Added value: +{
      +  "description": "FechaExpedicionFactura del registro anterior en DD-MM-YYYY.",
      +  "type": "string"
      +}
    • changedInput schema / properties / previous_hash / description
      Previous value: -"Huella del último registro en la cadena."New value: +"Huella del ultimo registro en la cadena."
    • addedInput schema / properties / previous_num_serie
      Added value: +{
      +  "description": "NumSerieFactura del registro anterior.",
      +  "type": "string"
      +}
  3. First observedv0.0.1

TDQS

A3.5/5.0
Behavior3/5

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

Sin anotaciones, la descripción aporta algo de transparencia: crea un registro de anulación específico (TipoHuella=01) y depende del encadenamiento con la huella actual. No menciona efectos secundarios, permisos ni si el registro se envía a AEAT, pero no contradice ninguna anotación.

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?

Dos frases breves y sin relleno; la información principal aparece al inicio y la frase secundaria aporta contexto de encadenamiento.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Dispone de esquema de entrada completo y esquema de salida, y la descripción cubre la operación y el contexto de cadena. Aun así, falta explicitar la relación con las herramientas hermanas de generación/envío y posibles condiciones previas para anular un registro.

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?

La cobertura del esquema es del 100%, por lo que la descripción no necesita documentar cada parámetro; 'Encadenado a la secuencia de huellas actual' refuerza el significado de previous_hash y previous_*. No añade formato o reglas de validación adicionales.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

El texto especifica un verbo concreto ('Genera') y el recurso exacto ('registro de anulacion VERI*FACTU') con el tipo huella. Esto permite distinguir la operación de anulación de otras herramientas del mismo dominio, aunque no nombra explícitamente a los hermanos.

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?

La frase 'Encadenado a la secuencia de huellas actual' da contexto de uso: debe ejecutarse tras un registro previo en la cadena. No hay una declaración explícita de cuándo preferir esta herramienta frente a es__generate_verifactu_record ni de cuándo no usarla.

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