Skip to main content
Glama
cmendezs

mcp-facturacion-electronica-es

by cmendezs

es__generate_verifactu_record

Generates a VERI*FACTU invoice record with a SHA-256 hash chain, returning the XML and hash needed to link the next record.

Instructions

Genera un registro de factura VERI*FACTU (Orden HAC/1177/2024) con cadena SHA-256 Huella.

Devuelve el XML del registro y la Huella para encadenar con el siguiente registro. Llame a es__detect_regional_regime antes para confirmar que el régimen es VERIFACTU.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
invoiceYesDatos de la factura (date, number, seller, buyer, vat_summary, note).
impuestoNoCódigo de impuesto (por defecto '01' IVA).01
software_idYesIDSistemaInformatico del software certificado.
invoice_typeNoTipoFactura según HAC/1177/2024 Annex I (F1, F2, F3, R1, R2, R3, R4, R5).F1
software_nifYesNIF del fabricante del software.
clave_regimenNoClaveRegimenEspecialOTrascendencia (por defecto '01').01
previous_hashNoHuella SHA-256 del registro precedente (omitir para el primero).
previous_fechaNoFechaExpedicionFactura del registro anterior en DD-MM-YYYY (requerido si previous_hash está presente).
previous_num_serieNoNumSerieFactura del registro anterior (requerido si previous_hash está presente).
previous_emisor_nifNoNIF del emisor del registro anterior (requerido si previous_hash está presente).
calificacion_operacionNoCalificacionOperacion (por defecto 'S1').S1

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

With no annotations provided, the description carries the behavioral disclosure burden. It does well by explaining that the tool generates a chained record, returns XML and a fingerprint for linking to the next record, and requires a preceding regime check. It could mention whether the tool persists anything or whether it only returns generated data, but the phrasing strongly implies a pure generation step.

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?

The description is concise: three short sentences, each with a distinct purpose — what it generates, what it returns, and what to do before calling. It is front-loaded with the core action and avoids filler.

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

Completeness4/5

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

For a tool with 11 parameters and nested objects, the description covers the essential workflow: check regime, generate chained record, use returned hash for next record. The output schema exists to document return structure, so the description does not need to list every field. It could be slightly richer by explicitly noting this tool does not submit to AEAT, but it is otherwise complete enough.

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%, so the schema already documents all 11 parameters. The description only paraphrases the invoice object content already in the schema and does not add meaningful parameter-level detail beyond what is structured. Baseline 3 applies.

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 clearly states a specific action ('Genera un registro de factura VERI*FACTU') with a concrete resource type and regulation reference. It also distinguishes the tool's output purpose (XML plus SHA-256 hash chain) from sibling generation tools like facturae or SII, so the agent can identify it by name and scope.

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?

The description gives an explicit prerequisite: call es__detect_regional_regime first to confirm the regime is VERIFACTU. This provides clear context for when the tool should be used, though it does not explicitly mention alternatives or when not to use it beyond that condition.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/cmendezs/mcp-facturacion-electronica-es'

If you have feedback or need assistance with the MCP directory API, please join our Discord server