Skip to main content
Glama
verifactu-mcp

verifactu-mcp

by ArceeDev

verifactu_hash

Read-onlyIdempotent

Computes the VERI*FACTU SHA-256 fingerprint (huella) for an invoice record, links it to the previous chain record, and returns the hash, exact hashed string, and AEAT field errors.

Instructions

Compute the VERI*FACTU fingerprint (huella, SHA-256) of one invoicing record.

record (AEAT field names; snake_case aliases accepted): alta: IDEmisorFactura, NumSerieFactura, FechaExpedicionFactura (DD-MM-AAAA), TipoFactura (F1, F2, F3, R1-R5), CuotaTotal, ImporteTotal (as written in the XML, decimal point), FechaHoraHusoGenRegistro (AAAA-MM-DDThh:mm:ss+hh:mm). anulación (TipoRegistro="anulacion"): IDEmisorFacturaAnulada, NumSerieFacturaAnulada, FechaExpedicionFacturaAnulada, FechaHoraHusoGenRegistro. previous_huella: fingerprint of the previous record of the chain; empty for the first record. Returns the fingerprint, the exact string hashed and any field problems (an error means the AEAT would reject the record).

Input Schema

NameRequiredDescriptionDefault
recordYes
previous_huellaNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, closed-world), and the description adds real value on top: it discloses that the return includes the fingerprint, the exact hashed string, and field problems, and that any error implies AEAT would reject the record. Missing only operational details such as auth or rate limits.

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-loads the one-line purpose, then uses a compact nested listing keyed by record type rather than prose. The density is justified by the format requirements, though the indented field enumeration is slightly harder to scan than a tighter layout.

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?

Complete for a two-parameter hashing tool with a nested free-form object: both record variants, the chain-link input, and error semantics are covered, and an output schema exists so return structure needs no further explanation. Nothing an agent needs to call it correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0% and the record object is free-form (additionalProperties: true), so the description carries the entire burden and does so thoroughly — enumerating AEAT field names, date/time formats (DD-MM-AAAA, AAAA-MM-DDThh:mm:ss+hh:mm), allowed TipoFactura codes, decimal-point convention, and the empty-string meaning of previous_huella.

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: 'Compute the VERI*FACTU fingerprint (huella, SHA-256) of one invoicing record.' The scoping to a single record, plus the chain-link parameter, distinguishes it from sibling validate_invoice_chain and from generate_verifactu_qr without opening any schema.

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 concrete usage context: which AEAT fields to supply for an 'alta' vs an 'anulación' record, and that previous_huella is empty for the first record of the chain. It does not explicitly state when to prefer this over validate_invoice_chain or validate_verifactu_xml, so alternatives are left implicit.

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