mcp-facturacion-electronica-es
The mcp-facturacion-electronica-es server provides tools for generating, validating, and submitting electronic invoices across Spain's six coexisting e-invoicing systems.
VERI*FACTU: Generate tamper-proof records with SHA-256 chaining; validate against the official XSD; submit to AEAT via MTLS; generate mandatory QR codes; create cancellation records.
Facturae / FACe (B2G): Generate Facturae 3.2.2 XML; apply XAdES-EPES digital signatures; submit to the FACe portal; query invoice status (Registered, Acknowledged, Rejected, Paid); validate against the XSD schema.
SII: Build SII records for issued/received invoices (types A0/A1/A4); submit batches of up to 10,000 records to AEAT's SOAP endpoint; query invoice status; generate modification or cancellation correction records.
TicketBAI: Generate TicketBAI XML with provincial-specific schemas (Araba, Gipuzkoa, Bizkaia); submit to the corresponding Basque authority; validate against the correct provincial XSD.
Crea y Crece / B2B (Ley 18/2022): Generate B2B invoices in UBL 2.1 or Facturae 3.2.2 format; check mandate applicability based on turnover, province, and SII enrollment per RD 254/2025.
Utility & Compliance Tools: Detect the applicable regional regime (VERIFACTU, TICKETBAI, NATICKET, or VERIFACTU+SII) from the INE province code; get current mandate deadlines and applicable systems for a business profile; parse and normalize AEAT XML responses into structured JSON with status codes, CSV verification codes, and error details.
mcp-facturacion-electronica-es 🇪🇸
Introduction
mcp-facturacion-electronica-es is an MCP (Model Context Protocol) server specialized
in Spanish e-invoicing. It provides tools to generate, validate, and submit electronic
invoices under the six coexisting systems in Spain: VERI*FACTU, Facturae/FACe,
SII, TicketBAI (Basque Country), NaTicket (Navarre), and the B2B obligations of Ley 18/2022
"Crea y Crece". The server is built on mcp-einvoicing-core,
the shared base library used by mcp-facture-electronique-fr (France, XP Z12-013) and
mcp-einvoicing-be (Belgium, Peppol BIS 3.0), which provides common models, validation
abstractions, XML utilities, and the exception hierarchy. mcp-einvoicing-core is installed
automatically as a transitive dependency, no additional steps are required.
Spain operates one of the most complex e-invoicing landscapes in Europe, with six overlapping systems that apply depending on taxpayer size, sector, and region. VERI*FACTU (Royal Decree 1007/2023, Order HAC/1177/2024) is the forthcoming mandatory real-time invoice registry for non-SII taxpayers, with hard deadlines in January and July 2027 (RD-ley 15/2025). SII (Suministro Inmediato de Informacion, Immediate Information Supply) already applies to large taxpayers (>6M EUR turnover). The Basque Country runs TicketBAI and Navarre runs NaTicket, both independent of the national AEAT framework. B2G invoicing via Facturae XML on the FACe portal has been mandatory since 2015 (Ley 25/2013).
Related MCP server: mcp-facture-electronique-fr
Installation
From PyPI (recommended)
pip install mcp-facturacion-electronica-esWithout prior installation, using uvx:
uvx mcp-facturacion-electronica-esFrom source
git clone https://github.com/cmendezs/mcp-facturacion-electronica-es.git
cd mcp-facturacion-electronica-es
uv sync --all-extrasConfiguration
All configuration is done through environment variables or a .env file.
AEAT / VERI*FACTU / SII
Variable | Description | Required |
|
| Yes |
| Path to FNMT-RCM PKCS#12 certificate | For submission |
| Certificate password | For submission |
| Taxpayer NIF | For submission |
FACe
Variable | Description | Required |
|
| Yes |
FACe authenticates via JWS using the same AEAT_CERTIFICATE_PATH / AEAT_CERTIFICATE_PASSWORD
certificate as VERI*FACTU/SII (see the AEAT section above); no separate FACe credentials are
required.
TicketBAI
Variable | Description | Required |
|
| Yes |
| Provincial signing certificate path | Yes |
| Certificate password | Yes |
Common (inherited from mcp-einvoicing-core)
Variable | Description | Default |
|
|
|
Claude Desktop integration
To use this server with Claude, add this configuration to your claude_desktop_config.json file:
{
"mcpServers": {
"facturacion-es": {
"command": "uvx",
"args": ["mcp-facturacion-electronica-es"],
"env": {
"AEAT_ENV": "sandbox",
"AEAT_CERTIFICATE_PATH": "/path/to/cert.p12",
"AEAT_CERTIFICATE_PASSWORD": "certificate-password"
}
}
}
}Cursor integration
Cursor supports MCP servers via stdio. Add the configuration in:
Global (all projects):
~/.cursor/mcp.jsonProject (this repository only):
.cursor/mcp.json
{
"mcpServers": {
"facturacion-es": {
"command": "uvx",
"args": ["mcp-facturacion-electronica-es"],
"env": {
"AEAT_ENV": "sandbox",
"AEAT_CERTIFICATE_PATH": "/path/to/cert.p12",
"AEAT_CERTIFICATE_PASSWORD": "certificate-password"
}
}
}
}Reload the Cursor window (Ctrl+Shift+P then Reload Window) to apply the changes.
Kiro integration
Kiro supports MCP servers via its dedicated configuration file. Two levels are available:
Global (all projects):
~/.kiro/settings/mcp.jsonWorkspace (this repository only):
.kiro/settings/mcp.json
{
"mcpServers": {
"facturacion-es": {
"command": "uvx",
"args": ["mcp-facturacion-electronica-es"],
"env": {
"AEAT_ENV": "sandbox",
"AEAT_CERTIFICATE_PATH": "/path/to/cert.p12",
"AEAT_CERTIFICATE_PASSWORD": "certificate-password"
},
"disabled": false,
"autoApprove": []
}
}
}The file is automatically reloaded on save. You can also open the config via the command palette (Cmd+Shift+P / Ctrl+Shift+P) then MCP.
Kiro security tip: rather than writing secrets in plain text, use the syntax
"AEAT_CERTIFICATE_PASSWORD": "${AEAT_CERTIFICATE_PASSWORD}", Kiro resolves shell environment variables at startup.
Available tools
VERI*FACTU
es__generate_verifactu_record
Generates a tamper-proof invoice record (Orden HAC/1177/2024) with SHA-256 Huella
chaining that links it to the previous record.
Parameter | Type | Required | Description |
|
| Yes | Core invoice model (seller, buyer, lines, VAT) |
|
| No | SHA-256 |
|
| Yes |
|
|
| Yes | NIF of the software manufacturer |
|
| Yes |
|
{
"tool": "es__generate_verifactu_record",
"arguments": {
"invoice": { "date": "2025-03-15", "number": "2025-0042", "currency": "EUR",
"seller": { "tax_id": { "country_code": "ES", "identifier": "B12345678" }, "name": "Empresa SL" },
"buyer": { "tax_id": { "country_code": "ES", "identifier": "A98765432" }, "name": "Cliente SA" },
"lines": [{ "line_number": 1, "description": "Servicios", "quantity": 10, "unit_price": 100.00, "vat_rate": 21.0 }]
},
"previous_hash": "3C4A9B...", "software_id": "SW-001", "software_nif": "B87654321", "invoice_type": "F1"
}
}The
Huellachaining algorithm (SHA-256 over the keyedcampo=valor&canonical string) is confirmed byte-for-byte against AEAT's own huella specification and its worked examples (specs/verifactu/documentation/Veri-Factu_especificaciones_huella_hash_registros.pdf). ⚠️ Still pending: full XSD v1.0 validation against a live AEAT test-environment acknowledgement.
es__validate_verifactu_record
Validates a VERI*FACTU XML record against the official XSD published with Orden HAC/1177/2024 (BOE-A-2024-22138).
Parameter | Type | Required | Description |
|
| Yes | Raw VERI*FACTU XML record |
|
| No | Schema version (default: |
{ "tool": "es__validate_verifactu_record", "arguments": { "xml": "<RegistroFacturacion>...</RegistroFacturacion>" } }Structural checks now branch correctly on
RegistroAltavs.RegistroAnulacion(a prior version false-flagged validRegistroAnulaciondocuments as missingTipoFactura/CuotaTotal/ImporteTotal, fields that only apply toRegistroAlta). Full XSD-mode validation (SuministroLR.xsd, bundled underresources/verifactu/) requires network access at runtime — it imports the W3C xmldsig-core schema by remote URL — and falls back to the structural checks above when that import can't resolve.
es__submit_verifactu_to_aeat
Submits a signed VERI*FACTU record to the AEAT real-time endpoint via MTLS
(FNMT-RCM Class 1 certificate) or, if EINVOICING_SIGNER_SOCKET is configured, via the
signer microservice. Respects AEAT_ENV=sandbox|production. The submission endpoint
(.../SistemaFacturacion/VerifactuSOAP) is confirmed from the official AEAT WSDL and shared
by both the alta/anulaciĂłn submission and the es__query_verifactu_status query operation.
Parameter | Type | Required | Description |
|
| Yes | Signed VERI*FACTU XML |
|
| Yes | Sender NIF |
{ "tool": "es__submit_verifactu_to_aeat", "arguments": { "xml": "<RegistroFacturacion>...</RegistroFacturacion>", "nif": "B12345678" } }The response includes a chain object implementing the accepted-only chain contract:
chain.safe_to_chain_from (the submitted record's own emisor_nif/num_serie/fecha/huella)
is populated only when AEAT's EstadoRegistro is Correcto or AceptadoConErrores — both mean
the record was actually stored under that Huella. Otherwise safe_to_chain_from is null with
an explicit warning not to use this record's Huella as the next record's previous_hash, or
(for a deferred result) a note to call es__query_verifactu_status first.
es__generate_qr_verifactu
Generates the mandatory VERI*FACTU QR code (HAC/1177/2024 Art. 10) as a base64-encoded PNG.
Encodes the AEAT verification URL with the text "Factura verificable en la sede
electronica de la AEAT". Candidate for promotion to mcp-einvoicing-core (QR generation).
URL format (host, path, nif/numserie/fecha/importe query parameters, and per-parameter
URL-encoding) is confirmed against the official AEAT QR specification
(specs/verifactu/documentation/DetalleEspecificacTecnCodigoQRfactura.pdf); the URL switches
between the sandbox and production ValidarQR host based on AEAT_ENV.
Parameter | Type | Required | Description |
|
| Yes | Issuer NIF |
|
| Yes |
|
|
| Yes |
|
|
| Yes | Invoice total including VAT |
|
| No | QR size in pixels (default: 200) |
{ "tool": "es__generate_qr_verifactu", "arguments": { "nif": "B12345678", "invoice_number": "2025-0042", "invoice_date": "2025-03-15", "total_amount": 1210.00 } }es__cancel_verifactu_record
Generates a VERI*FACTU cancellation record (RegistroAnulacion, TipoHuella=01) chained to
the current fingerprint sequence. Both the anulaciĂłn Huella (SHA-256 over
IDEmisorFacturaAnulada/NumSerieFacturaAnulada/FechaExpedicionFacturaAnulada/Huella/
FechaHoraHusoGenRegistro — a distinct field set from RegistroAlta's, not a reduced copy of
it) and the top-level <IDFactura> block's element names are confirmed against the official AEAT
huella specification and SuministroInformacion.xsd.
Parameter | Type | Required | Description |
|
| Yes |
|
|
| Yes |
|
|
| Yes | Issuer NIF |
|
| Yes |
|
{ "tool": "es__cancel_verifactu_record", "arguments": { "original_invoice_number": "2025-0042", "original_invoice_date": "2025-03-15", "issuer_nif": "B12345678", "previous_hash": "3C4A9B..." } }es__query_verifactu_status
Queries the EstadoRegistro of an already-submitted VERI*FACTU record
(ConsultaFactuSistemaFacturacion / ConsultaLR.xsd). Use after a deferred result from
es__submit_verifactu_to_aeat: wait retry_after_seconds, then call this tool to confirm
the final state (Correcto / AceptadoConErrores / Anulado) before chaining the next
record. Requires AEAT_ENV, AEAT_CERTIFICATE_PATH, and AEAT_CERTIFICATE_PASSWORD, same
as es__submit_verifactu_to_aeat.
Parameter | Type | Required | Description |
|
| Yes | NIF of the |
|
| Yes | Name/razĂłn social of the |
|
| Yes | Invoice date being queried, |
|
| No |
|
{ "tool": "es__query_verifactu_status", "arguments": { "nif": "B12345678", "name": "Empresa SL", "invoice_date": "2025-03-15", "num_serie_factura": "2025-0042" } }Root element name (
ConsultaFactuSistemaFacturacion) and endpoint — the same.../SistemaFacturacion/VerifactuSOAPURL used byes__submit_verifactu_to_aeat, per the official WSDL — are both confirmed. ⚠️ Still pending: response parsing has not been validated against a live AEAT sandbox acknowledgement.
Facturae / FACe
es__generate_facturae_xml
Generates a Facturae 3.2.2 compliant XML invoice for B2G submission. Uses
InvoiceDocument from mcp-einvoicing-core.
Parameter | Type | Required | Description |
|
| Yes | Core invoice model |
|
| No | Facturae schema version (default: |
|
| No | Indirect tax regime: |
|
| No | Recargo de Equivalencia rate (%), if applicable |
|
| No | Explicit Recargo de Equivalencia amount; if omitted, computed as |
|
| No | IRPF withholding rate (%), emitted in |
{ "tool": "es__generate_facturae_xml", "arguments": { "invoice": { "date": "2025-03-15", "number": "2025-0042", "seller": { "tax_id": { "country_code": "ES", "identifier": "B12345678" }, "name": "Proveedor SL" }, "buyer": { "tax_id": { "country_code": "ES", "identifier": "S2800000D" }, "name": "Ayuntamiento de Madrid" }, "lines": [{ "line_number": 1, "description": "Suministro", "quantity": 5, "unit_price": 200.00, "vat_rate": 21.0 }] } } }⚠️ Pending regulatory confirmation
es__sign_facturae_xades
Applies an XAdES-EPES digital signature (ETSI EN 319 132-1) to a Facturae XML document.
Candidate for promotion to mcp-einvoicing-core (XAdES signing, score 3/3).
Parameter | Type | Required | Description |
|
| Yes | Unsigned Facturae XML |
|
| Yes | Path to PKCS#12 certificate ( |
|
| No | Signature policy OID (default: Facturae standard) |
The certificate password is not accepted as a tool argument (ES-SH-6, avoids plaintext
credential exposure in LLM context/logs); set AEAT_CERTIFICATE_PASSWORD instead.
{ "tool": "es__sign_facturae_xades", "arguments": { "xml": "<Facturae>...</Facturae>", "cert_path": "/certs/empresa.p12" } }⚠️ Pending regulatory confirmation
es__submit_to_face
Submits a signed Facturae XML to FACe (Punto General de Entrada de Facturas Electronicas)
via the FACe integrator REST API. Authenticates with a JWS-signed JWT (RS256, x5c header)
minted from the same AEAT_CERTIFICATE_PATH / AEAT_CERTIFICATE_PASSWORD certificate used
for VERI*FACTU/SII, per FACe-manual-api-integradores.pdf s2.3.
Parameter | Type | Required | Description |
|
| Yes | Facturae XML with XAdES signature |
|
| Yes | FACe |
|
| Yes | FACe |
|
| Yes | FACe |
{ "tool": "es__submit_to_face", "arguments": { "xml": "<Facturae>...</Facturae>", "administrative_unit": "U00000038", "accounting_office": "U00000038", "management_body": "U00000038" } }⚠️ Pending regulatory confirmation
es__get_face_invoice_status
Queries the processing status of an invoice on FACe. Returns standard status codes:
1200 (Registered), 2400 (Acknowledged), 3100 (Rejected), 4100 (Paid). The raw FACe
response is never echoed to the LLM; only a structured, non-sensitive subset
(status_code, codigo, descripcion, numeroRegistro) is returned (ES-SH-7).
Parameter | Type | Required | Description |
|
| Yes | FACe registration number |
{ "tool": "es__get_face_invoice_status", "arguments": { "invoice_id": "FAC-2025-00012345" } }⚠️ Pending regulatory confirmation
es__validate_facturae_schema
Runs the structural field checklist against a Facturae XML, then attempts full XSD-mode
validation against the official Facturae 3.2.2 schema using lxml.
Parameter | Type | Required | Description |
|
| Yes | Facturae XML to validate |
|
| No | Schema version (default: |
{ "tool": "es__validate_facturae_schema", "arguments": { "xml": "<Facturae>...</Facturae>" } }Full XSD-mode validation (
Facturaev3_2_2.xml, bundled underresources/facturae/) requires network access at runtime — it imports the W3C xmldsig-core schema by remote URL — and falls back to the structural checks above when that import can't resolve.
⚠️ Pending regulatory confirmation
SII (Suministro Inmediato de Informacion)
es__build_sii_invoice_record
Builds an AEAT SII XML record (issued FacturaExpedida or received FacturaRecibida)
conforming to the AEAT SII technical guide v3.0 (April 2024). Supports TipoComunicacion A0/A1/A4.
Parameter | Type | Required | Description |
|
| Yes | Core invoice model |
|
| Yes |
|
|
| No |
|
{ "tool": "es__build_sii_invoice_record", "arguments": { "invoice": { "date": "2025-03-15", "number": "2025-0042" }, "record_type": "issued", "communication_type": "A0" } }⚠️ Pending regulatory confirmation
es__submit_sii_batch
Submits a batch of invoices (up to 10,000 records) to the AEAT SII SOAP endpoint. Requires MTLS.
Parameter | Type | Required | Description |
|
| Yes | List of XML strings from |
|
| Yes |
|
|
| Yes | Fiscal year (YYYY) |
{ "tool": "es__submit_sii_batch", "arguments": { "records": ["<RegistroLRFacturasEmitidas>...</RegistroLRFacturasEmitidas>"], "record_type": "issued", "fiscal_year": 2025 } }⚠️ Pending regulatory confirmation:
AuthMode.MTLSis not yet implemented inmcp-einvoicing-core.
es__query_sii_status
Queries the status of a submitted SII batch via ConsultaFactInformadasEmitidas or
ConsultaFactInformadasRecibidas.
Parameter | Type | Required | Description |
|
| Yes | NIF of the SII titular (obligado tributario) |
|
| Yes | Name or company name of the titular |
|
| Yes | Fiscal year (YYYY) |
|
| Yes | Settlement period: |
|
| No |
|
|
| No |
|
|
| No | Issuer NIF to filter by (only applies to |
{ "tool": "es__query_sii_status", "arguments": { "nif_titular": "B12345674", "nombre_titular": "Ejemplo SL", "fiscal_year": 2025, "period": "03", "record_type": "issued" } }⚠️ Pending regulatory confirmation
es__generate_sii_correction
Generates an SII modification (A1) or cancellation (A4) record referencing the original
invoice via IDFactura. The credit note builder is a candidate for mcp-einvoicing-core
(score 3/3).
Parameter | Type | Required | Description |
|
| Yes | Invoice being corrected |
|
| No | Corrected data ( |
|
| Yes |
|
|
| Yes |
|
{ "tool": "es__generate_sii_correction", "arguments": { "original_invoice": { "number": "2025-0042" }, "correction_type": "A1", "record_type": "issued" } }⚠️ Pending regulatory confirmation
TicketBAI
es__generate_ticketbai_xml
Generates a TicketBAI XML invoice with XAdES signature and HuellaTBAI chain. Automatically
selects the correct provincial XSD: Araba v1.2, Gipuzkoa v1.2, Bizkaia v2.1.
Parameter | Type | Required | Description |
|
| Yes | Core invoice model |
|
| Yes |
|
|
| No |
|
|
| Yes | TicketBAI software license key |
|
| Yes | Signing certificate path |
|
| Yes | Certificate password |
{ "tool": "es__generate_ticketbai_xml", "arguments": { "invoice": { "date": "2025-03-15", "number": "2025-0042" }, "province": "gipuzkoa", "software_license": "TBAI-GI-12345", "cert_path": "/certs/empresa.p12", "cert_password": "s3cr3t" } }⚠️ Pending regulatory confirmation: the three provincial XSDs must be packaged separately; cross-province validation is not permitted.
es__submit_ticketbai
Submits a TicketBAI XML record to the corresponding Basque provincial authority. The endpoint
is automatically routed: Araba (batuz.eus), Gipuzkoa (tbai.egoitza.gipuzkoa.eus),
Bizkaia (www.bizkaia.eus/ogasun).
Parameter | Type | Required | Description |
|
| Yes | Signed TicketBAI XML |
|
| Yes |
|
|
| Yes | Sender NIF |
{ "tool": "es__submit_ticketbai", "arguments": { "xml": "<T:TicketBai>...</T:TicketBai>", "province": "bizkaia", "nif": "B12345678" } }⚠️ Pending regulatory confirmation
es__validate_ticketbai_schema
Validates a TicketBAI XML document against the correct provincial XSD. The schemas are not interchangeable between provinces.
Parameter | Type | Required | Description |
|
| Yes | TicketBAI XML |
|
| Yes |
|
{ "tool": "es__validate_ticketbai_schema", "arguments": { "xml": "<T:TicketBai>...</T:TicketBai>", "province": "gipuzkoa" } }⚠️ Pending regulatory confirmation
Crea y Crece / B2B
es__generate_b2b_einvoice_es
Generates a B2B invoice conforming to EN 16931 in UBL 2.1 or Facturae 3.2.2 format per Ley 18/2022, developed by RD 238/2026 (BOE-A-2026-7295).
Parameter | Type | Required | Description |
|
| Yes | Core invoice model |
|
| No |
|
{ "tool": "es__generate_b2b_einvoice_es", "arguments": { "invoice": { "date": "2025-03-15", "number": "2025-0042" }, "format": "ubl" } }⚠️ RD 238/2026 confirms the admitted formats (EN 16931: CII/UBL/EDIFACT/Facturae; this tool implements UBL and Facturae). The Orden Ministerial (Hacienda) developing the public-solution technical package (Disp. final tercera) is still pending.
es__check_b2b_mandate_applicability
Determines the applicable regime (VERI*FACTU, SII, TicketBAI, NaTicket) based on turnover, province code, and SII enrollment. Applies the mutual exclusion logic of Real Decreto 254/2025.
Parameter | Type | Required | Description |
|
| Yes | Annual VAT turnover in EUR |
|
| Yes | INE province code (e.g., |
|
| No | SII enrollment (default: |
|
| No |
|
{ "tool": "es__check_b2b_mandate_applicability", "arguments": { "annual_turnover_eur": 2500000, "tax_address_province_code": "28", "enrolled_in_sii": false, "entity_type": "IS" } }⚠️ Pending regulatory confirmation
Utility tools
es__detect_regional_regime
Detects the applicable e-invoicing regime based on the INE province code.
Returns VERIFACTU, TICKETBAI, NATICKET, or VERIFACTU+SII.
Basque provinces: 01 Araba, 20 Gipuzkoa, 48 Bizkaia. Navarre: 31.
All others return VERIFACTU. Candidate for promotion to mcp-einvoicing-core.
Parameter | Type | Required | Description |
|
| Yes | Two-digit INE province code |
|
| No | SII enrollment (default: |
{ "tool": "es__detect_regional_regime", "arguments": { "province_code": "20", "enrolled_in_sii": false } }⚠️ Pending regulatory confirmation
es__get_compliance_status
Returns the current mandate deadlines and operating system for a business profile.
Reflects RD-ley 15/2025, subject to changes by subsequent legislation.
Candidate for promotion to mcp-einvoicing-core (generic deadline registry).
Parameter | Type | Required | Description |
|
| Yes |
|
|
| Yes | INE province code |
|
| No | For SII threshold check (6M EUR) |
|
| No | SII enrollment |
{ "tool": "es__get_compliance_status", "arguments": { "entity_type": "IS", "province_code": "28", "annual_turnover_eur": 1000000, "enrolled_in_sii": false } }⚠️ Pending regulatory confirmation
es__parse_aeat_response
Parses and normalizes an AEAT XML response (VERI*FACTU or SII) into structured JSON.
Extracts EstadoEnvio (Correcto/AceptadoConErrores/Incorrecto), CSV
(secure verification code), and error details. Candidate for promotion to
mcp-einvoicing-core (generic vendor XML response parser, score 2/3).
Parameter | Type | Required | Description |
|
| Yes | Raw AEAT XML response |
|
| No |
|
{ "tool": "es__parse_aeat_response", "arguments": { "xml": "<RespuestaRegFactuSistemaFacturacion>...</RespuestaRegFactuSistemaFacturacion>", "response_type": "verifactu" } }⚠️ Pending regulatory confirmation
Architecture
mcp-facturacion-electronica-es is a country adapter within the mcp-einvoicing family,
built on mcp-einvoicing-core.
mcp-einvoicing-core (v0.1.0+)
│ BaseDocumentGenerator, BaseDocumentValidator, BaseLifecycleManager
│ InvoiceDocument, InvoiceParty, InvoiceLineItem, VATSummary, PaymentTerms
│ EInvoicingError, ValidationError, XSDValidationError, PlatformError
│ BaseEInvoicingClient, OAuthConfig, AuthMode (OAUTH2 / BEARER / MTLS)
│ get_logger, format_amount, xml_element, format_error
│
├── mcp-facture-electronique-fr (France — XP Z12-013, Chorus Pro)
├── mcp-einvoicing-be (Belgium — Peppol BIS 3.0, PINT-BE, Mercurius)
├── mcp-facturacion-electronica-es (Spain — this package)
│ ├── verifactu/ record generation, hash chain, QR, cancellation
│ ├── facturae/ Facturae 3.2.2 XML, XAdES-EPES, FACe submission
│ ├── sii/ batch building, AEAT SOAP, corrections
│ ├── ticketbai/ XML generation, provincial routing, validation
│ ├── b2b/ UBL/Facturae Crea y Crece, mandate detector
│ └── utils/ regime detection, AEAT response parser, deadline registry
├── mcp-fattura-elettronica-it (Italy — FatturaPA / SDI)
└── mcp-ksef-pl (Poland — KSeF / FA(2))Vendor neutrality
This server implements the standard itself: it builds, validates, and signs the document locally. It is not a client for a commercial invoicing platform, and your signing keys and credentials never leave your own infrastructure.
Records and invoices go directly to the tax authority — the AEAT (SII, VeriFactu), FACe, or the relevant provincial TicketBAI platform — using your own certificate; no intermediary is involved.
Supported standards
The Spanish e-invoicing ecosystem has six coexisting systems with distinct scopes,
formats, and timelines. VERI*FACTU introduces tamper-proof chained invoice records
submitted in real time to the AEAT (Agencia Estatal de Administracion Tributaria),
applicable to most businesses from 2027 (RD-ley 15/2025). SII is already mandatory for
large taxpayers under a 4-day communication window. Facturae XML with XAdES-EPES signing
covers all B2G invoicing through the FACe portal. The Basque Country applies TicketBAI
independently, with three provincial authorities each maintaining their own XSD schemas and
endpoints. Navarre operates NaTicket. The Ley Crea y Crece mandates B2B e-invoicing for
all businesses; RD 238/2026 (BOE-A-2026-7295) confirms the admitted formats (EN 16931:
CII/UBL/EDIFACT/Facturae), while the Orden Ministerial developing the public-solution
technical package is still pending. Regime detection
based on tax domicile and turnover is a prerequisite to all other operations: use
es__detect_regional_regime first.
Regulatory coverage
System | Scope | Format | Mandatory from | Status |
VERI*FACTU | All non-SII businesses | Proprietary XML (XSD v1.0 HAC/1177/2024) | IS: Jan 2027 / Others: Jul 2027 (RD-ley 15/2025) | Implemented (pending regulatory confirmation) |
Facturae / FACe | B2G (public sector) | Facturae 3.2.2 + XAdES-EPES | Mandatory since 2015 (Ley 25/2013) | Implemented (pending regulatory confirmation) |
SII | Turnover >6M EUR, VAT groups, REDEME | XML SOAP/REST AEAT | Already mandatory (RD 596/2016) | Implemented (pending regulatory confirmation) |
TicketBAI | Araba, Gipuzkoa, Bizkaia | Provincial XML + XAdES + QR | By province, 2022-2023 | Removed from scope (v0.2.0) |
Crea y Crece (B2B) | All businesses (12/24 months after OM, by turnover) | UBL 2.1 or Facturae 3.2.2 (EN 16931); CII/EDIFACT also admitted, not implemented | RD 238/2026 published; Orden Ministerial (public solution) pending | Implemented (formats confirmed by RD 238/2026; public-solution wiring deferred to OM) |
NaTicket | Navarre | Foral XML + signature | Foral mandate (phased rollout) | Partial (via |
SII / VERI*FACTU mutual exclusion (Real Decreto 254/2025): Taxpayers enrolled in SII are exempt from VERI*FACTU. Use
es__check_b2b_mandate_applicabilitybefore generating any record.
Compliance notes
Notice: Mandate dates reflect RD-ley 15/2025 (December 2025) and are subject to changes by subsequent legislation or AEAT administrative instructions. This software does not constitute legal or tax advice.
Mandate timeline
System | Targets | Deadline |
SII | Turnover >6M EUR / VAT groups / REDEME | Already mandatory (RD 596/2016) |
Facturae/FACe | All B2G suppliers | Already mandatory (Ley 25/2013) |
TicketBAI | All businesses in the Basque Country | Phased rollout by sector 2022-2023 |
VERI*FACTU | IS (Impuesto sobre Sociedades) taxpayers | January 2027 (RD-ley 15/2025) |
VERI*FACTU | IRPF + other non-SII | July 2027 (RD-ley 15/2025) |
Crea y Crece B2B | Turnover >8M EUR (art. 121 Ley 37/1992) | 12 months after the Orden Ministerial's entry into force |
Crea y Crece B2B | All other businesses | 24 months after the Orden Ministerial's entry into force |
Regional exceptions
Basque Country: TicketBAI applies instead of VERI*FACTU. Each of the three provinces (Araba, Gipuzkoa, Bizkaia) has a different XSD, endpoint, and software certification process. National AEAT endpoints do not apply.
Navarre: NaTicket applies (Hacienda Foral de Navarra). VERI*FACTU does not apply.
Ceuta / Melilla: IPSI (not VAT); SII/VERI*FACTU applicability differs, verify with the AEAT.
SII / VERI*FACTU mutual exclusion: Real Decreto 254/2025 makes these systems mutually exclusive. Taxpayers enrolled in SII do not submit VERI*FACTU records.
All AEAT submission endpoints require an FNMT-RCM certificate or one from an accredited CA.
The AEAT provides a free test environment at prewww2.aeat.es.
Tests
# Install development dependencies
uv sync --all-extras
# Run the full test suite
uv run pytest tests/ -v
# With coverage report
uv run pytest --cov=mcp_facturacion_electronica_es --cov-report=term-missingContributing
Open an issue before starting significant work. For reusable utility logic across country
adapters, open a core-promotion issue in mcp-einvoicing-core before implementing it:
use the scoring rubric (3 = MUST promote, 2 = SHOULD, 1 = keep here).
git clone https://github.com/cmendezs/mcp-facturacion-electronica-es.git
cd mcp-facturacion-electronica-es
uv sync --all-extras
uv run pytest
make auditAll regulatory assertions must reference a specific BOE publication, an official XSD version,
or an AEAT technical guide version. Do not remove
⚠️ Pending regulatory confirmation without linking the verified source in the
PR description.
Other e-invoicing MCP servers
Country | Server |
🌍 Global | |
🇧🇪 Belgium | |
🇧🇷 Brazil | |
🇫🇷 France | |
🇩🇪 Germany | |
🇮🇳 India | |
🇮🇹 Italy | |
🇲🇽 Mexico | |
🇵🇱 Poland | |
🇸🇬 Singapore | |
🇪🇸 Spain | |
🇦🇪 United Arab Emirates |
License
Released under the Apache License 2.0. For the full version history, see CHANGELOG.md.
Available Tools
20 toolses__build_sii_invoice_recordEs Build Sii Invoice RecordB
Construye un registro XML AEAT SII en formato SOAP.
EmisiĂłn FacturaExpedida o recepciĂłn FacturaRecibida, conforme a la guĂa tĂ©cnica SII v3.0 (abril 2024). Soporta TipoComunicacion A0 (alta), A1 (modificaciĂłn) y A4 (baja).
| Name | Required | Description | Default |
|---|---|---|---|
| invoice | Yes | Datos de la factura. | |
| record_type | Yes | DirecciĂłn: 'issued' (expedida) o 'received' (recibida). | |
| clave_regimen | No | ClaveRegimenEspecialOTrascendencia (por defecto '01'). | 01 |
| communication_type | No | TipoComunicacion: A0 alta (por defecto), A1 modificaciĂłn, A4 baja. | A0 |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the burden. It discloses the output format (XML SOAP), the SII version (v3.0, April 2024), and supported TipoComunicacion values (A0/A1/A4). It does not disclose whether the tool validates the XML, whether it persists anything, or what the output schema contains, but the description does add meaningful behavioral context beyond the schema.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is compact and front-loaded: it states the core purpose in the first sentence, then adds version and communication-type details. Every sentence earns its place, though the Spanish phrasing is slightly dense and could be clearer about the build-only scope.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool has an output schema and 100% parameter coverage, so the description need not explain return values. However, with no annotations and a complex domain (SII XML/SOAP), the description could usefully mention whether the record is validated, whether it handles signing, and how it relates to submission tools. It is adequate but leaves the agent to infer the build-vs-submit boundary.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
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 four parameters. The description adds context for record_type ('issued' vs 'received') and communication_type (A0/A1/A4), but these are also present in the schema. The description does not add meaning beyond the schema for invoice or clave_regimen, so a baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool builds an AEAT SII XML record in SOAP format, distinguishing between issued (FacturaExpedida) and received (FacturaRecibida) invoices, and lists supported communication types. It is specific about the resource and format, though it does not explicitly differentiate from siblings like es__generate_sii_correction or es__submit_sii_batch; the verb 'build' and XML/SOAP focus make the core purpose clear.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage: it is for constructing SII records, not submitting them, and it names the supported communication types. However, it does not explicitly state when to use this tool versus alternatives such as es__submit_sii_batch (submission) or es__generate_sii_correction (corrections). The context is clear enough for an agent to infer the build-vs-submit distinction, but explicit when/when-not guidance is missing.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
es__cancel_verifactu_recordEs Cancel Verifactu RecordA
Genera un registro de anulacion VERI*FACTU (TipoHuella=01).
Encadenado a la secuencia de huellas actual.
| Name | Required | Description | Default |
|---|---|---|---|
| issuer_nif | Yes | NIF del emisor. | |
| issuer_name | Yes | Nombre/razon social del emisor. | |
| previous_hash | Yes | Huella del ultimo registro en la cadena. | |
| previous_fecha | No | FechaExpedicionFactura del registro anterior en DD-MM-YYYY. | |
| previous_num_serie | No | NumSerieFactura del registro anterior. | |
| previous_emisor_nif | No | NIF del emisor del registro anterior (IDEmisorFactura en EncadenamientoFacturaAnteriorType). | |
| original_invoice_date | Yes | FechaExpedicionFactura original (YYYY-MM-DD). | |
| original_invoice_number | Yes | NumSerieFactura a anular. |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
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.
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.
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.
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.
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.
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.
es__check_b2b_mandate_applicabilityEs Check B2B Mandate ApplicabilityA
Determina el régimen de facturación electrónica aplicable.
VERI*FACTU, SII, TicketBAI, NaTicket, a partir del volumen de operaciones, cĂłdigo de provincia y enrolamiento en SII. Aplica la lĂłgica de exclusiĂłn mutua del Real Decreto 254/2025.
| Name | Required | Description | Default |
|---|---|---|---|
| entity_type | No | Tipo de obligado: 'IS' (Sociedades) o 'IRPF'. | IS |
| enrolled_in_sii | No | InscripciĂłn en el SII (por defecto: false). | |
| annual_turnover_eur | Yes | Volumen anual de operaciones IVA en EUR. | |
| tax_address_province_code | Yes | CĂłdigo de provincia INE de dos dĂgitos. |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the burden. It discloses that the tool applies mutual exclusion logic from RD 254/2025, which is a useful behavioral trait. However, it doesn't describe what happens on edge cases (e.g., invalid province code, zero turnover, conflicting inputs), nor does it mention whether the tool returns a single regime or a list. The description adds some behavioral context but not comprehensive.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise and front-loaded with the main purpose. The first sentence states the core function, and the second adds the legal logic. It's efficient, though the line break and formatting could be slightly cleaner. No wasted words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool has an output schema (not shown but indicated), which likely explains return values. The description covers the inputs and the decision logic. It doesn't mention error handling or edge cases, but for a determination/check tool with a clear purpose and full schema coverage, this is reasonably complete. A note on what the output looks like would make it 5.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
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 four parameters. The description adds context by explaining how the parameters are used (volume, province code, SII enrollment) to determine the regime, but it doesn't add new semantic details beyond what the schema provides. Baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: determining the applicable e-invoicing regime (VERI*FACTU, SII, TicketBAI, NaTicket) based on turnover, province code, and SII enrollment. It also references the specific legal logic (Real Decreto 254/2025), which distinguishes it from sibling tools like es__detect_regional_regime or es__generate_b2b_einvoice_es.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies when to use this tool: when you need to determine which e-invoicing regime applies based on business parameters. It doesn't explicitly state when NOT to use it or name alternatives, but the context of sibling tools (e.g., es__detect_regional_regime) and the specific inputs make the usage context fairly clear. A brief mention of alternatives would push this to 5.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
es__detect_regional_regimeEs Detect Regional RegimeA
Detecta el régimen de facturación electrónica aplicable.
A partir del cĂłdigo de provincia INE de dos dĂgitos. Devuelve VERIFACTU, TICKETBAI, NATICKET o VERIFACTU+SII. Usar siempre antes de llamar a cualquier otra herramienta de este servidor.
| Name | Required | Description | Default |
|---|---|---|---|
| province_code | Yes | CĂłdigo de provincia INE de dos dĂgitos (p. ej., '28', '01', '31'). | |
| enrolled_in_sii | No | InscripciĂłn en el SII (por defecto: false). |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No hay anotaciones, y la descripciĂłn aporta que la herramienta devuelve un valor dentro de un conjunto finito y que depende de la provincia y de la inscripciĂłn en SII. Sin embargo, no dice explĂcitamente si es solo de lectura, si hace llamadas externas o si requiere autenticaciĂłn/precondiciones. Aunque 'Detecta' sugiere una operaciĂłn de consulta, el margen de mejora está en declarar esa naturaleza read-only.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
La descripción es breve y directa: tres frases, cada una con una función clara (qué hace, de dónde sale, cuándo usarla). No hay relleno y la información importante está al principio.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Para una herramienta con solo 2 parámetros, schema descrito al 100% y output schema declarado, la descripción proporciona lo esencial: propósito, entradas básicas, valores de salida y directriz de uso. No es necesario ampliar formato de retorno porque el output schema lo cubre.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
El input-schema ya documenta el 100% de los parámetros: province_code con formato y ejemplos, y enrolled_in_sii con valor por defecto. La descripciĂłn agrega el propĂłsito global y los valores de salida, pero no explica explĂcitamente cĂłmo enrolled_in_sii=true modifica el resultado (p. ej., cuándo aparece VERIFACTU+SII), por lo que se queda en la referencia mĂnima.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
La descripciĂłn comienza con un verbo especĂfico ('Detecta el rĂ©gimen de facturaciĂłn electrĂłnica aplicable') y define el recurso (cĂłdigo de provincia INE) y los posibles resultados (VERIFACTU, TICKETBAI, NATICKET, VERIFACTU+SII). Esto la distingue de las herramientas hermanas de generaciĂłn, validaciĂłn, envĂo y consulta, al presentarla como una etapa previa de decisiĂłn.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
La frase 'Usar siempre antes de llamar a cualquier otra herramienta de este servidor' es una pauta de uso explĂcita y jerárquica. No hay ambigĂĽedad sobre cuándo invocarla: siempre antes de cualquier otra herramienta, lo cual compensa la ausencia de una secciĂłn de alternativas.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
es__generate_b2b_einvoice_esEs Generate B2B Einvoice EsC
Genera una factura B2B conforme a EN 16931 en formato UBL 2.1 o Facturae 3.2.2.
SegĂşn la Ley 18/2022 'Crea y Crece'. RD 238/2026 publicado; formatos confirmados (EN 16931: CII/UBL/EDIFACT/Facturae). Orden Ministerial (Hacienda) pendiente para la soluciĂłn pĂşblica.
| Name | Required | Description | Default |
|---|---|---|---|
| format | No | Formato de salida: 'ubl' (por defecto) o 'facturae'. | ubl |
| invoice | Yes | Datos de la factura. |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No hay anotaciones, por lo que la descripciĂłn debe asumir toda la carga de transparencia. Solo menciona la generaciĂłn conforme a normas, pero no informa sobre efectos secundarios, si valida el contenido, si firma el documento, o si realiza alguna comprobaciĂłn de obligatoriedad. Para una herramienta de generaciĂłn compleja, esto es insuficiente.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
La primera frase es directa y va al grano. La segunda frase aporta contexto regulatorio Ăştil aunque no imprescindible para la invocaciĂłn; el conjunto es breve, estructurado y no contiene relleno excesivo.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
La herramienta tiene un esquema complejo con un objeto 'invoice' sin propiedades definidas y no hay anotaciones. La descripciĂłn no explica cĂłmo estructurar los datos de la factura, si el resultado requiere validaciĂłn o firma posterior, ni cĂłmo se relaciona con las herramientas hermanas de envĂo a AEAT/FACE. La existencia de output schema no compensa la falta de orientaciĂłn práctica.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
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 lĂnea base es 3. El parámetro 'format' tiene descripciĂłn suficiente ('ubl' por defecto o 'facturae'), pero 'invoice' solo se describe como 'Datos de la factura' y no se detalla su estructura interna ni campos obligatorios, pese a ser un objeto anidado con additionalProperties.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
La descripciĂłn indica claramente el verbo ('Genera'), el recurso ('factura B2B') y los formatos de salida ('UBL 2.1 o Facturae 3.2.2'), además de la norma aplicable (EN 16931). Aunque no diferencia explĂcitamente de herramientas hermanas como generate_facturae_xml, el propĂłsito es claro y accionable.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No se indica cuándo usar esta herramienta frente a alternativas ni cuándo no usarla. La referencia a la Ley 18/2022 y al RD 238/2026 aporta contexto normativo, pero no orienta al agente sobre la elección entre esta herramienta y las relacionadas con Facturae, Verifactu o SII.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
es__generate_facturae_xmlEs Generate Facturae XmlA
Genera una factura XML conforme a Facturae 3.2.2 para envĂo B2G al portal FACe.
El documento generado está sin firmar; use es__sign_facturae_xades para firmarlo.
| Name | Required | Description | Default |
|---|---|---|---|
| invoice | Yes | InvoiceDocument con seller, buyer, vat_summary y lines. | |
| tax_type | No | Impuesto indirecto aplicable a todas las lĂneas de la factura (IVA: penĂnsula/Baleares; IPSI: Ceuta/Melilla; IGIC: Canarias). No se admite mezclar impuestos en una misma factura. Por defecto: 'IVA'. | IVA |
| irpf_rate | No | Tipo de retenciĂłn IRPF (%), emitido en TaxesWithheld. | |
| irpf_amount | No | Importe de retenciĂłn IRPF a deducir del total de la factura. | |
| schema_version | No | VersiĂłn del esquema Facturae (por defecto: '3.2.2'). | 3.2.2 |
| invoice_issuer_type | No | EU (emisor=vendedor), EM (emisor=comprador), TE (tercero). Por defecto: 'EU'. | EU |
| resolution_reference | No | ResolutionReference para facturas B2G a Administraciones PĂşblicas. | |
| recargo_equivalencia_rate | No | Tipo de Recargo de Equivalencia (%), si aplica. | |
| recargo_equivalencia_amount | No | Importe explĂcito del Recargo de Equivalencia. Si se omite, se calcula como base_imponible * recargo_equivalencia_rate / 100. | |
| receiver_transaction_reference | No | ReceiverTransactionReference para facturas B2G. |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full transparency burden. It does disclose the most important behavioral trait—the generated document is unsigned and requires a separate signing step. However, it does not address whether any state changes, permissions, or side effects exist beyond that.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences with zero waste: the first explains what is generated and for whom, the second provides the critical caveat and next-step tool. Essential information is front-loaded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the rich input schema, the output schema, and the clear naming of the signing tool, the description provides enough context for correct invocation. It could also have pointed to es__submit_to_face as the final B2G submission step, but the signing step is enough as the immediate next action.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 100% description coverage, so each parameter already carries semantic meaning (e.g., tax_type distinguishes IVA/IGIC/IPSI, irpf_rate, recargo_equivalencia). The main description adds little parameter-level detail, so a baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and deliverable: generates a Facturae 3.2.2 XML for B2G submission to the FACe portal. This clearly distinguishes it from B2B, Verifactu, and SII sibling tools.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly says the XML is for B2G/FACe and names es__sign_facturae_xades as the next step, giving the agent a direct call chain. It does not explicitly list when not to use it, but the B2G/FACe and unsigned-signing guidance is enough to disambiguate from the other siblings.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
es__generate_qr_verifactuEs Generate Qr VerifactuA
Genera el cĂłdigo QR obligatorio VERI*FACTU (HAC/1177/2024 Art. 10) como PNG en base64.
Encodes la URL de verificaciĂłn de la AEAT: https://www2.agenciatributaria.gob.es/wlpl/TIKE-CONT/ValidarQR?...
| Name | Required | Description | Default |
|---|---|---|---|
| nif | Yes | NIF del emisor. | |
| size_px | No | Tamaño del QR en pĂxeles (por defecto: 200). | |
| invoice_date | Yes | FechaExpedicionFactura en YYYY-MM-DD. | |
| total_amount | Yes | ImporteTotal de la factura (con IVA incluido). | |
| invoice_number | Yes | NumSerieFactura. |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the burden. It discloses the output format (PNG in base64) and the encoded URL, which is useful. However, it does not mention whether the QR is generated locally, whether any network call is made, or what the output schema contains beyond the base64 PNG.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise and front-loaded with the core purpose and regulation. The second sentence adds the encoded URL context. It is slightly truncated (ends with '...'), which is a minor structural flaw, but overall it is efficient and focused.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool has an output schema and 100% parameter coverage, so the description need not explain return values or parameters in depth. However, with no annotations, the description could have clarified whether the QR generation is offline or calls AEAT, and how the output is returned. The core purpose is clear, but behavioral context is thin.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
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 parameters. The description adds the context that these fields map to the AEAT QR URL, but it does not add meaning beyond the schema's field descriptions. Baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: generating the mandatory VERI*FACTU QR code as a base64 PNG, and cites the specific regulation (HAC/1177/2024 Art. 10). It also names the encoded AEAT verification URL, which distinguishes it from sibling tools that handle records, submission, or status queries.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies the tool is for generating the QR code for a specific invoice, but it does not explicitly state when to use it versus alternatives like es__generate_verifactu_record or es__submit_verifactu_to_aeat. The regulatory citation and QR-specific wording provide context, but no explicit when/when-not guidance is given.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
es__generate_sii_correctionEs Generate Sii CorrectionA
Genera un registro de modificaciĂłn SII (A1) o baja (A4).
Referencia la factura original mediante IDFactura.
| Name | Required | Description | Default |
|---|---|---|---|
| record_type | Yes | 'issued' o 'received'. | |
| correction_type | Yes | 'A1' (modificaciĂłn) o 'A4' (baja). | |
| original_invoice | Yes | Factura original que se rectifica. | |
| corrected_invoice | No | Datos corregidos. Omitir para una baja (A4). |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It states only that it generates a record and references the original invoice via IDFactura; it does not indicate side effects, whether the record is submitted, or if validation occurs. This is minimal for a statutory tax tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The two-sentence description is entirely focused: first sentence states the action, the second adds the key referencing detail. No filler, irrelevant info, or redundant restatement of the tool name.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the output schema exists and the input schema has 100% coverage with useful descriptions, the description adds the essential missing detail (IDFactura reference). However, it does not clarify the relationship with the submission workflow or the expected format of the returned correction record, which would slightly improve completeness.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, but the description adds meaningful semantics not present in the schema: 'Referencia la factura original mediante IDFactura' tells the agent that original_invoice must be identified by IDFactura. This is genuine extra information about the original_invoice parameter.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool generates an SII correction record (A1 modification) or cancellation (A4), which is a specific verb and resource. It also references the original invoice via IDFactura, distinguishing it from sibling tools that generate Verifactu or build regular SII invoice records.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No explicit guidance is given on when to use this tool versus alternatives. The description does not mention any exclusions, prerequisites, or references to sibling tools like es__build_sii_invoice_record or es__submit_sii_batch. The only usage hint is the schema note about omitting corrected_invoice for A4, which is not in the description.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
es__generate_verifactu_recordEs Generate Verifactu RecordA
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.
| Name | Required | Description | Default |
|---|---|---|---|
| invoice | Yes | Datos de la factura (date, number, seller, buyer, vat_summary, note). | |
| impuesto | No | CĂłdigo de impuesto (por defecto '01' IVA). | 01 |
| software_id | Yes | IDSistemaInformatico del software certificado. | |
| invoice_type | No | TipoFactura segĂşn HAC/1177/2024 Annex I (F1, F2, F3, R1, R2, R3, R4, R5). | F1 |
| software_nif | Yes | NIF del fabricante del software. | |
| clave_regimen | No | ClaveRegimenEspecialOTrascendencia (por defecto '01'). | 01 |
| previous_hash | No | Huella SHA-256 del registro precedente (omitir para el primero). | |
| previous_fecha | No | FechaExpedicionFactura del registro anterior en DD-MM-YYYY (requerido si previous_hash está presente). | |
| previous_num_serie | No | NumSerieFactura del registro anterior (requerido si previous_hash está presente). | |
| previous_emisor_nif | No | NIF del emisor del registro anterior (requerido si previous_hash está presente). | |
| calificacion_operacion | No | CalificacionOperacion (por defecto 'S1'). | S1 |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden. It discloses the core behavior: generating a record, returning XML and a fingerprint for chaining, and notes the prerequisite check. It doesn't mention side effects or error conditions, but for a generation tool these are not critical and the output schema covers return details.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is three sentences, each earning its place: the main action, the output, and a prerequisite call. It is front-loaded with the most important information and contains no fluff.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (11 parameters, nested invoice object, output schema), the description covers the essential aspects: what it generates, what it returns, and the prerequisite check. The output schema and parameter schema handle detailed field documentation, so nothing critical is missing.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the baseline is 3. The description adds value by explaining the chaining concept ('encadenar con el siguiente registro'), which clarifies the purpose of the previous_* parameters. It also contextualizes the Huella, aiding understanding of the hash parameter.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool generates a VERI*FACTU invoice record with SHA-256 chaining, referencing the specific regulation. It mentions returning XML and the fingerprint, distinguishing it from validation, submission, and cancellation siblings by focusing on generation.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It explicitly instructs calling es__detect_regional_regime first to confirm the regime is VERIFACTU, which is a clear precondition. It does not explicitly name alternative tools for other regimes, but the specificity to VERI*FACTU and the prerequisite make the usage context clear.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
es__get_compliance_statusEs Get Compliance StatusC
Devuelve los plazos de mandato vigentes y el sistema operativo para un perfil de empresa.
Refleja el RD-ley 15/2025 — sujeto a cambios por legislación posterior.
| Name | Required | Description | Default |
|---|---|---|---|
| entity_type | Yes | Tipo de obligado tributario: 'IS' o 'IRPF'. | |
| province_code | Yes | CĂłdigo de provincia INE de dos dĂgitos. | |
| enrolled_in_sii | No | InscripciĂłn en el SII. | |
| annual_turnover_eur | No | Volumen anual de operaciones IVA en EUR (para umbral SII > €6M). |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are present, so the description must carry behavioral disclosure. It only says it returns values and warns that the data may change due to later legislation. It does not state whether the operation is read-only, whether it has side effects, error semantics, rate limits, or the reliability conditions under which it might fail. The warning about future legislative changes is useful but does not fulfill the full transparency burden.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two short sentences, front-loaded with the main purpose and a compliance caveat. No wasted words. It loses one point because the core term 'sistema operativo' is unclear, which could have been replaced with a more precise phrase in the same space.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
An output schema exists, so the return structure is covered, but the description is too thin for a regulatory determination tool. It doesn't explain what constitutes a 'perfil de empresa', how the inputs map to RDL 15/2025 outputs, nor which mandate deadlines/systems are implicated. Given the complexity of the domain and the large sibling set, the description is incomplete for correct tool selection and invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% – all four parameters (entity_type, province_code, enrolled_in_sii, annual_turnover_eur) already have descriptions in the schema. The tool description adds no extra parameter-level meaning; only 'perfil de empresa' loosely aggregates them. Baseline score 3 is appropriate because the description does not harm or compensate beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
La description states the tool 'Devuelve los plazos de mandato vigentes y el sistema operativo' for a company profile, so the general action (returns compliance-related data) is identifiable. However, the term 'sistema operativo' is ambiguous in this tax/legal domain, and the description does not distinguish this tool from the many sibling tools (SII, Verifactu, Facturae, Face). It is not a tautology, but lacks precision.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No explicit guidance tells an agent when to call this tool instead of a sibling (e.g., es__query_sii_status, es__check_b2b_mandate_applicability, es__detect_regional_regime). The reference to RD-ley 15/2025 implicitly suggests it is for mandates under that law, but no when-to-use/when-not-to-use conditions or alternatives are given.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
es__get_face_invoice_statusEs Get Face Invoice StatusB
Consulta el estado de tramitaciĂłn de una factura en FACe.
CĂłdigos: 1200 Registrada, 2400 Reconocida, 3100 Rechazada, 4100 Pagada.
| Name | Required | Description | Default |
|---|---|---|---|
| invoice_id | Yes | NĂşmero de registro FACe. |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool queries status but does not mention any side effects (though likely read-only), authentication needs, or rate limits. Since the description does not contradict any annotations (none exist), but lacks necessary behavioral context, a score of 2 is appropriate.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise, with two sentences that are front-loaded with the purpose. The status code list is useful and does not add unnecessary length. It could be slightly more structured with a clear 'when to use' line, but overall it is efficient.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool has a single parameter, an output schema (though not detailed), and no annotations. The description is minimal but sufficient for a simple status check. However, without annotations, it lacks details on authentication or potential errors, and the output schema isn't explained. Given the simplicity, this is adequate but not complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema already describes the only parameter (invoice_id) as 'NĂşmero de registro FACe' with 100% coverage. The description adds no additional meaning beyond reinforcing the domain (FACe). Since coverage is high, a baseline of 3 is appropriate, but the description does not compensate for any lack of detail.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: checking the processing status of an invoice in FACe. It specifies a verb and resource ('consulta el estado'), making it easy to understand. Although it doesn't explicitly distinguish it from siblings, the unique verb and resource combination, along with the provided status codes, help differentiate it.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for checking invoice status, but does not explicitly state when to use this tool versus alternatives. Among siblings, tools like es__query_verifactu_status or es__submit_to_face exist, but no explicit guidance is given. However, the inclusion of status codes suggests practical usage, but no exclusions or alternatives are mentioned.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
es__parse_aeat_responseEs Parse Aeat ResponseA
Analiza y normaliza una respuesta XML de la AEAT (VERI*FACTU o SII) a JSON estructurado.
Extrae EstadoEnvio, CSV (cĂłdigo seguro de verificaciĂłn) y detalle de errores.
| Name | Required | Description | Default |
|---|---|---|---|
| xml | Yes | Respuesta XML de la AEAT en crudo. | |
| response_type | No | Tipo de respuesta a analizar (por defecto: 'verifactu'). | verifactu |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are present, so the description carries the burden of behavioral disclosure. It does explain that XML is normalized into JSON and that EstadoEnvio, CSV, and error details are extracted, but it does not describe behavior on malformed XML, encoding assumptions, or the lack of side effects.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The definition is compact and front-loaded: the action appears in the first sentence, and the extracted fields in the second. There is no filler, though the 'VERI*FACTU' typo and lack of formatting keep it from being perfect.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a two-parameter tool with 100% schema coverage and an output schema, the description provides the essential purpose and the key extracted fields, so an agent can invoke it correctly. It lacks explicit usage conditions, but that gap is captured by the usage-guidelines dimension.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
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 adds value by implying that response_type selects between VERI*FACTU and SII, which complements the schema's bare default of 'verifactu'. The xml parameter is mostly restated by the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb ('Analiza y normaliza'), identifies the exact resource ('respuesta XML de la AEAT (VERI*FACTU o SII)') and the output ('JSON estructurado'). It also names the extracted fields, which clearly distinguishes it from the sibling generation, submission, and status tools.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The intended use is only implied: an agent would infer to call this tool after receiving an AEAT XML response. It does not explicitly state when to prefer this over siblings, list prerequisites, or mention cases where this tool should not be used.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
es__query_sii_statusEs Query Sii StatusB
Consulta el estado de facturas en el SII mediante ConsultaFactInformadasEmitidas/Recibidas (SOAP).
ES-LC-2: reemplaza el REST GET no funcional por el envelope SOAP correcto. Filtra por ejercicio, periodo y, opcionalmente, por NIF del emisor y numero de factura.
| Name | Required | Description | Default |
|---|---|---|---|
| period | Yes | Periodo de liquidacion: '01'..'12' para mensual, o '0A' para anual. | |
| emisor_nif | No | NIF del emisor para filtrar (opcional, solo para received). | |
| fiscal_year | Yes | Ejercicio fiscal (YYYY). | |
| nif_titular | Yes | NIF del titular SII (obligado tributario). | |
| record_type | No | Tipo de registro: 'issued' (expedidas) o 'received' (recibidas). | issued |
| invoice_number | No | NumSerieFacturaEmisor para filtrar por factura concreta (opcional). | |
| nombre_titular | Yes | Nombre o razon social del titular. |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden. It conveys a read-only intent via 'Consulta' and names the SOAP envelope method, which is useful. However, it does not disclose authentication requirements, potential side effects, rate limits, or whether results are fetched live or cached.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is short and front-loaded with the core purpose. The 'ES-LC-2' replacement note is slightly noisy and not essential for invocation, but it does not significantly harm clarity.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The output schema exists and all parameters are documented, so most invocation details are covered. Still, the description lacks usage alternatives and behavioral caveats, and the historical REST-replacement note is not enough to fully orient an agent in the broader tool landscape.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
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 parameters. The description adds a helpful summary of the main filters (ejercicio, periodo, NIF emisor, nĂşmero de factura), but this largely restates the schema rather than adding substantial new meaning.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states it consults SII invoice status via specific SOAP operations (ConsultaFactInformadasEmitidas/Recibidas). It is distinct from the sibling Verifactu/Face status tools by explicitly naming the SII context, though it does not explicitly differentiate from those siblings.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
There is no direct guidance on when to use this tool versus sibling status query tools such as es__query_verifactu_status or es__get_face_invoice_status. The 'ES-LC-2' note about replacing a REST GET is historical context, not actionable selection guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
es__query_verifactu_statusEs Query Verifactu StatusA
Consulta el EstadoRegistro de un registro VERI*FACTU ya enviado.
(ConsultaFactuSistemaFacturacion / ConsultaLR.xsd). Use esta tool tras un resultado 'deferred' de es__submit_verifactu_to_aeat, esperando retry_after_seconds, para confirmar el estado final (Correcto / AceptadoConErrores / Anulado) antes de encadenar el siguiente registro. Requiere AEAT_ENV, AEAT_CERTIFICATE_PATH y AEAT_CERTIFICATE_PASSWORD, igual que es__submit_verifactu_to_aeat.
| Name | Required | Description | Default |
|---|---|---|---|
| nif | Yes | NIF del obligado a la emisiĂłn (ObligadoEmision). | |
| name | Yes | Nombre/razĂłn social del obligado a la emisiĂłn. | |
| invoice_date | Yes | Fecha de la factura consultada, YYYY-MM-DD (determina PeriodoImputacion). | |
| num_serie_factura | No | NumSerieFactura a filtrar (omitir para consultar todo el perĂodo). |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden. It discloses that the operation is a query ('Consulta') implying read-only behavior, and it lists the required authentication environment variables (AEAT_ENV, AEAT_CERTIFICATE_PATH, AEAT_CERTIFICATE_PASSWORD). It also states the expected final states it will return. However, it does not explicitly mention error handling or side effects, but the 'consulta' semantics and workflow coverage are sufficient. A minor gap is not stating whether repeated calls are safe or how to handle non-final states, but overall it is transparent.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise and well-structured: it starts with the purpose, then gives the precise usage trigger and next steps, and finally lists the required environment variables. Each sentence is purposeful and no filler is present. It is front-loaded with the core action, making it easy for an agent to quickly understand the tool's role.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description covers the essential context for correct invocation: it explains when to call (after deferred result), what to wait for (retry_after_seconds), and what to expect (final states). It also states the required environment variables. Since an output schema exists (though not shown), return value details are likely handled there. The only minor omission is guidance on repeated calls or handling unexpected states, but overall it is complete for an agent to use correctly in the described workflow.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100% – each parameter already has a description explaining its meaning (NIF, name, invoice_date, num_serie_factura). The tool description does not add any new information about the parameters; it merely restates the workflow context. Since the schema already documents the parameters well, the description adds no additional value here, meeting the baseline of 3.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'Consulta' (query) and the resource: the registration status (EstadoRegistro) of an already-sent VERI*FACTU record. It also references the specific XSD schema, which further pinpoints the operation. This clearly distinguishes it from siblings like es__submit_verifactu_to_aeat (submit) and es__cancel_verifactu_record (cancel), making it unambiguous what the tool does.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives explicit usage guidance: use this tool after a 'deferred' result from es__submit_verifactu_to_aeat, wait for retry_after_seconds, and confirm the final state (Correcto / AceptadoConErrores / Anulado) before proceeding. It also mentions required environment variables identical to the sibling submit tool, which helps the agent prepare. This is clear when-to-use guidance with no ambiguity.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
es__sign_facturae_xadesEs Sign Facturae XadesA
Aplica una firma digital XAdES-EPES (ETSI EN 319 132-1) a un documento Facturae XML.
Usa el certificado PKCS#12 indicado para firmar con SHA-256 + RSA. La polĂtica de firma por defecto es la de Facturae (Orden EHA/962/2007).
HUMAN-IN-THE-LOOP: llame sin confirmation_token para recibir un resumen de confirmación y un token; muéstrelo al usuario y vuelva a llamar con confirmation_token para aplicar la firma real.
| Name | Required | Description | Default |
|---|---|---|---|
| xml | Yes | XML Facturae sin firmar. | |
| cert_path | No | Ruta al certificado PKCS#12 (.p12 / .pfx). La contraseña se lee de AEAT_CERTIFICATE_PASSWORD (nunca como argumento de la tool). | |
| confirmation_token | No | Token de la respuesta awaiting_confirmation previa. | |
| signature_policy_id | No | OID/URI de la polĂtica de firma. Por defecto: polĂtica Facturae (Orden EHA/962/2007). | |
| signature_policy_hash | No | SHA-256 base64 del documento de polĂtica de firma. |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It discloses the signing algorithm (SHA-256 + RSA), the default signature policy, and the human-in-the-loop confirmation mechanism. It also clarifies that the certificate password is read from an environment variable and never passed as an argument. This is transparent about the security aspect. It does not mention potential side effects (e.g., whether the input XML is modified or a new file is produced) or error conditions, but for a signing operation the behavior is reasonably well covered.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is moderately sized with a clear structure: it states the core purpose, then details the signature process, then the confirmation workflow. The human-in-the-loop instruction is prominent and important. It could be slightly more concise (e.g., merging the certificate path explanation), but the length is justified by the complexity of the confirmation flow.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given that an output schema exists, the description does not need to explain return values. It covers the required parameters, the default behavior, and the confirmation flow. It does not mention validation of the input XML or potential error handling, but those are likely covered by the schema and the tool's implementation. Overall, an agent has enough information to invoke the tool correctly in the intended two-step manner.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
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 adds value by explaining the confirmation_token parameter's role in the two-step flow, the default signature policy for signature_policy_id, and that cert_path refers to a PKCS#12 file. These clarifications go beyond the schema's terse descriptions, providing operational context that helps the agent use the parameters correctly.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly states it applies XAdES-EPES digital signature to a Facturae XML document, using a PKCS#12 certificate. This is specific and distinguishes it from sibling tools that handle generation, validation, or submission. The verb 'Aplica' and the resource 'documento Facturae XML' are explicit.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly outlines the two-step confirmation workflow: call without confirmation_token to receive a summary, then call with the token to apply the signature. This is clear guidance for the intended usage. It does not explicitly contrast with alternatives, but the sibling tools serve different purposes, so usage context is implied. It could be improved by noting when not to use it (e.g., if only validation is needed).
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
es__submit_sii_batchEs Submit Sii BatchA
EnvĂa un lote de facturas (máximo 10.000 registros) al endpoint SOAP SII de la AEAT.
Requiere AEAT_ENV, AEAT_CERTIFICATE_PATH y AEAT_CERTIFICATE_PASSWORD (MTLS).
HUMAN-IN-THE-LOOP: llame sin confirmation_token para recibir un resumen de confirmaciĂłn y un token; muĂ©strelo al usuario y vuelva a llamar con confirmation_token para ejecutar el envĂo real.
| Name | Required | Description | Default |
|---|---|---|---|
| records | Yes | Lista de SOAP envelopes XML de es__build_sii_invoice_record. | |
| fiscal_year | Yes | Ejercicio fiscal (YYYY). | |
| record_type | Yes | 'issued' o 'received'. | |
| confirmation_token | No | Token de la respuesta awaiting_confirmation previa. |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description discloses key behavioral traits: the batch size limit (10,000 records), the requirement for MTLS certificates, and the two-phase confirmation mechanism. It also implies the tool is a write/submission operation. However, there are no annotations to contradict or complement, and the description does not mention what happens on failure, retries, or the exact structure of the awaiting_confirmation response. Still, the disclosed behaviors go well beyond a minimal description.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is compact and well-structured: a one-sentence purpose, a one-line prerequisite, and a clear human-in-the-loop instruction. Every sentence earns its place, and the most important operational detail (the two-step confirmation) is highlighted. No fluff or repetition.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description covers the essential operational context: prerequisites, batch limit, and the confirmation flow. The output schema exists, so return values are presumably documented there. The main gap is that it doesn't mention error handling or what happens if the token is invalid/expired, but for a submission tool with a clear two-step flow, this is adequate. Slightly more detail on failure modes would make it complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
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 four parameters. The description adds context for records (SOAP envelopes from es__build_sii_invoice_record) and confirmation_token (from a previous awaiting_confirmation response), which is helpful. However, it does not add much detail about fiscal_year or record_type beyond what the schema already says. Baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's function: sending a batch of invoices (max 10,000 records) to the AEAT SII SOAP endpoint. It names the specific resource (SOAP SII endpoint of AEAT) and the verb (submit/send), and the batch limit adds precision. It is distinguishable from siblings like es__submit_verifactu_to_aeat and es__submit_to_face because it explicitly targets the SII SOAP endpoint.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides explicit usage guidance: it lists required environment variables (AEAT_ENV, AEAT_CERTIFICATE_PATH, AEAT_CERTIFICATE_PASSWORD) and clearly explains the human-in-the-loop two-step flow: call without confirmation_token to get a summary and token, show it to the user, then call again with confirmation_token to execute. This is strong, actionable guidance that an agent can follow without ambiguity.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
es__submit_to_faceEs Submit To FaceA
EnvĂa un XML Facturae firmado con XAdES a FACe a travĂ©s de la API REST B2B de FACe v2.
FACe = Punto General de Entrada de Facturas ElectrĂłnicas. AutenticaciĂłn JWS (RS256 + x5c) per FACe-manual-api-integradores.pdf s2.3: requiere FACE_ENV y AEAT_CERTIFICATE_PATH (+ AEAT_CERTIFICATE_PASSWORD).
HUMAN-IN-THE-LOOP: llame sin confirmation_token para recibir un resumen de confirmaciĂłn y un token; muĂ©strelo al usuario y vuelva a llamar con confirmation_token para ejecutar el envĂo real.
| Name | Required | Description | Default |
|---|---|---|---|
| xml | Yes | XML Facturae con firma XAdES. | |
| management_body | Yes | CĂłdigo OrganoGestor de FACe. | |
| accounting_office | Yes | CĂłdigo OficinasContables de FACe. | |
| confirmation_token | No | Token de la respuesta awaiting_confirmation previa. | |
| administrative_unit | Yes | CĂłdigo UnidadTramitadora de FACe. |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It discloses the two-phase human-in-the-loop behavior, the authentication mechanism, and the fact that the first call returns an awaiting_confirmation response. It does not explicitly state that the second call is the actual submission, but that is clearly implied by 'para ejecutar el envĂo real'. It could add details about side effects or idempotency, but the core behavioral traits are well covered.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is compact and front-loaded with the core action, then expands the acronym, then gives authentication context, then the human-in-the-loop flow. Every sentence earns its place. It loses one point because the authentication details are dense and could be slightly more structured, but overall it is efficient and well-organized.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool has an output schema, so return values are already documented. The description covers the essential context: what FACe is, how authentication works, and the two-step confirmation flow. It does not mention error cases or what happens if the token is invalid, but for a submission tool with an output schema, the provided context is strong. A 4 is warranted because it is nearly complete for an agent to invoke correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
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 five parameters. The description adds context for confirmation_token (explaining it comes from a prior awaiting_confirmation response) and for xml (specifying it must be XAdES-signed), which is useful. However, it does not explain the meaning of administrative_unit, accounting_office, or management_body beyond their schema descriptions, so the baseline of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb ('EnvĂa'), a specific resource (XML Facturae firmado con XAdES), and a specific destination (FACe via API REST B2B v2). It also expands the acronym FACe, which disambiguates it from sibling tools like es__submit_verifactu_to_aeat and es__submit_sii_batch. The human-in-the-loop confirmation flow further distinguishes it from other submission tools.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly explains when to call without confirmation_token (to get a summary and token) and when to call again with confirmation_token (to execute the real send). It also names the authentication requirements (JWS RS256 + x5c, FACE_ENV, AEAT_CERTIFICATE_PATH, AEAT_CERTIFICATE_PASSWORD), which are prerequisites an agent must know before invoking. This is clear when-to-use guidance with no ambiguity.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
es__submit_verifactu_to_aeatEs Submit Verifactu To AeatA
EnvĂa un registro VERI*FACTU firmado al endpoint en tiempo real de la AEAT mediante MTLS.
Usa el certificado FNMT-RCM. Requiere AEAT_ENV, AEAT_CERTIFICATE_PATH y AEAT_CERTIFICATE_PASSWORD. Si la respuesta trae parsed_response.status == 'deferred' (TiempoEsperaEnvio), espere retry_after_seconds y llame a es__query_verifactu_status para confirmar el EstadoRegistro final antes de encadenar el siguiente registro.
HUMAN-IN-THE-LOOP: llame sin confirmation_token para recibir un resumen de confirmaciĂłn y un token; muĂ©strelo al usuario y vuelva a llamar con confirmation_token para ejecutar el envĂo real.
| Name | Required | Description | Default |
|---|---|---|---|
| nif | Yes | NIF del remitente. | |
| xml | Yes | Registro VERI*FACTU XML firmado. | |
| confirmation_token | No | Token de la respuesta awaiting_confirmation previa. |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full load, and it does so thoroughly: it discloses the mTLS requirement, FNMT-RCM certificate, required environment variables, the deferred-response behavior, and the two-phase confirmation flow where a call without confirmation_token returns a summary and token rather than executing the real send. This is critical non-schema information.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is structured as a one-sentence purpose followed by two focused blocks on deferred response and human-in-the-loop flow. It is somewhat longer than minimal, but every sentence conveys behavior that an agent cannot get from the schema or annotations.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the output schema and the absence of annotations, the description provides all essential surrounding context: environment/auth prerequisites, confirmation workflow, deferred handling, and follow-up tool. Whatever the output schema documents is not discussed, which is acceptable, and no critical gap is evident for an agent to call it correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, and the description adds value, especially for confirmation_token, explaining that it comes from an 'awaiting_confirmation' response and that a call without it returns a summary instead of executing the real send. It does not add new semantics for nif or xml, but the baseline is 3, and the token detail earns a 4.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific action: 'EnvĂa un registro VERI*FACTU firmado al endpoint en tiempo real de la AEAT mediante MTLS.' It clearly identifies the operation as submission to AEAT, distinguishing it from query/generate/validate tools. It does not explicitly contrast with sibling submission tools such as es__submit_to_face, though the resource and goal are unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives clear when-to-use guidance: send a signed VERI*FACTU record to AEAT, and if the response has parsed_response.status == 'deferred', wait retry_after_seconds and call es__query_verifactu_status. It also explains the human-in-the-loop call pattern. It lacks explicit when-not-to-use or alternative-tool exclusions, so it falls short of a 5.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
es__validate_facturae_schemaEs Validate Facturae SchemaA
Valida un XML Facturae contra el XSD oficial 3.2.2.
Realiza validación estructural y, si el XSD está disponible en resources/facturae/, también validación de esquema completa.
| Name | Required | Description | Default |
|---|---|---|---|
| xml | Yes | XML Facturae a validar. | |
| schema_version | No | VersiĂłn del esquema (por defecto: '3.2.2'). | 3.2.2 |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden. It usefully discloses the conditional behavior that complete schema validation only happens if the XSD is available, but it does not state whether the operation is read-only, how errors are returned, or what happens if schema_version differs from 3.2.2.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two short sentences with no filler. The core purpose is front-loaded, and the second sentence adds the key conditional behavior without redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple two-parameter validator with an output schema, the description covers purpose and the main behavioral condition clearly. It is slightly incomplete in not explicitly guiding the agent among the many related e-invoicing siblings, but it is adequate for low-complexity invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the input schema already documents both parameters. The description adds no additional parameter-level semantics beyond restating the default XSD version, so the baseline score of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb ('Valida'), an exact resource ('XML Facturae'), and a precise standard ('XSD oficial 3.2.2'). This clearly distinguishes the tool from generation, signing, submission, and other Spanish e-invoicing siblings.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The purpose implies use for validating Facturae XML against a schema, but it does not explicitly explain when to choose this over related validation tools or mention exclusions. The only conditional guidance is about XSD availability, which is more behavioral than usage-oriented.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
es__validate_verifactu_recordEs Validate Verifactu RecordA
Valida un registro VERI*FACTU XML.
Realiza validación estructural y, si el XSD v1.0 (HAC/1177/2024) está disponible en resources/verifactu/, también validación de esquema.
| Name | Required | Description | Default |
|---|---|---|---|
| xml | Yes | Registro VERI*FACTU XML en crudo. | |
| schema_version | No | VersiĂłn del esquema XSD (por defecto: '1.0'). | 1.0 |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the burden of behavioral disclosure. It explicitly discloses that structural validation is always performed and schema validation only when the XSD is available at a specific path. This conditional behavior is valuable and goes beyond the basic purpose, though it does not mention side effects (likely none) or error semantics.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise and front-loads the main purpose in the first sentence, then adds a relevant detail about conditional schema validation. No unnecessary words or repetition.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given that the tool has an output schema (not shown but noted) and the description explains the validation logic including the XSD availability condition, the description is largely complete. It could mention how schema_version influences XSD selection, but this is a minor gap and likely covered by the parameter description.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100% for both parameters (xml and schema_version), so the schema already documents them. The description adds no additional parameter information, so the baseline of 3 applies.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool validates a VERI*FACTU XML record and distinguishes it from siblings like generation, submission, and query tools. The verb 'valida' plus the resource 'registro VERI*FACTU XML' makes the purpose specific and unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies the tool is for validating VERI*FACTU XML records, but it does not explicitly state when to use it versus alternatives (e.g., validate_facturae_schema for Facturae). It mentions the conditional schema validation but lacks explicit usage scenarios or exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
20 tool updates
v0.8.0- Changed
es__build_sii_invoice_record7 fields changed- added
Input schema / additionalPropertiesAdded value: +false - added
Input schema / properties / clave_regimenAdded value: +{ + "default": "01", + "description": "ClaveRegimenEspecialOTrascendencia (por defecto '01').", + "type": "string" +} - changed
Input schema / properties / communication_type / descriptionPrevious value: -"TipoComunicacion: A0 alta (por defecto), A1 modificaciĂłn, A4 baja."New value: +"TipoComunicacion: A0 alta (por defecto),\nA1 modificaciĂłn, A4 baja." - removed
Input schema / properties / communication_type / enumRemoved value: -[ - "A0", - "A1", - "A4" -] - added
Input schema / properties / invoice / additionalPropertiesAdded value: +true - removed
Input schema / properties / record_type / enumRemoved value: -[ - "issued", - "received" -] - changed
Output schema / (root)Previous value: -nullNew value: +{ + "additionalProperties": true, + "type": "object" +}
- Changed
es__cancel_verifactu_record12 fields changed- added
Input schema / additionalPropertiesAdded value: +false - added
Input schema / properties / previous_emisor_nif / anyOfAdded value: +[ + { + "type": "string" + }, + { + "type": "null" + } +] - added
Input schema / properties / previous_emisor_nif / defaultAdded value: +null - changed
Input schema / properties / previous_emisor_nif / descriptionPrevious value: -"NIF del emisor del registro anterior (IDEmisorFactura en EncadenamientoFacturaAnteriorType)."New value: +"NIF del emisor del registro anterior (IDEmisorFactura\nen EncadenamientoFacturaAnteriorType)." - removed
Input schema / properties / previous_emisor_nif / typeRemoved value: -"string" - added
Input schema / properties / previous_fecha / anyOfAdded value: +[ + { + "type": "string" + }, + { + "type": "null" + } +] - added
Input schema / properties / previous_fecha / defaultAdded value: +null - removed
Input schema / properties / previous_fecha / typeRemoved value: -"string" - added
Input schema / properties / previous_num_serie / anyOfAdded value: +[ + { + "type": "string" + }, + { + "type": "null" + } +] - added
Input schema / properties / previous_num_serie / defaultAdded value: +null - removed
Input schema / properties / previous_num_serie / typeRemoved value: -"string" - changed
Output schema / (root)Previous value: -nullNew value: +{ + "additionalProperties": true, + "type": "object" +}
- Changed
es__check_b2b_mandate_applicability4 fields changed- added
Input schema / additionalPropertiesAdded value: +false - added
Input schema / properties / entity_type / defaultAdded value: +"IS" - removed
Input schema / properties / entity_type / enumRemoved value: -[ - "IS", - "IRPF" -] - changed
Output schema / (root)Previous value: -nullNew value: +{ + "additionalProperties": true, + "type": "object" +}
- Changed
es__detect_regional_regime4 fields changed- added
Input schema / additionalPropertiesAdded value: +false - changed
Input schema / properties / province_code / descriptionPrevious value: -"CĂłdigo de provincia INE de dos dĂgitos (p. ej., '28', '01', '31')."New value: +"CĂłdigo de provincia INE de dos dĂgitos (p. ej.,\n'28', '01', '31')." - removed
Input schema / properties / province_code / patternRemoved value: -"^[0-9]{1,2}$" - changed
Output schema / (root)Previous value: -nullNew value: +{ + "additionalProperties": true, + "type": "object" +}
- Changed
es__generate_b2b_einvoice_es4 fields changed- added
Input schema / additionalPropertiesAdded value: +false - removed
Input schema / properties / format / enumRemoved value: -[ - "ubl", - "facturae" -] - added
Input schema / properties / invoice / additionalPropertiesAdded value: +true - changed
Output schema / (root)Previous value: -nullNew value: +{ + "additionalProperties": true, + "type": "object" +}
- Changed
es__generate_facturae_xml28 fields changed- added
Input schema / additionalPropertiesAdded value: +false - added
Input schema / properties / invoice / additionalPropertiesAdded value: +true - changed
Input schema / properties / invoice_issuer_type / descriptionPrevious value: -"EU (emisor=vendedor), EM (emisor=comprador), TE (tercero). Por defecto: 'EU'."New value: +"EU (emisor=vendedor), EM (emisor=comprador),\nTE (tercero). Por defecto: 'EU'." - removed
Input schema / properties / invoice_issuer_type / enumRemoved value: -[ - "EU", - "EM", - "TE" -] - added
Input schema / properties / irpf_amount / anyOfAdded value: +[ + { + "type": "number" + }, + { + "type": "null" + } +] - added
Input schema / properties / irpf_amount / defaultAdded value: +null - removed
Input schema / properties / irpf_amount / typeRemoved value: -"number" - added
Input schema / properties / irpf_rate / anyOfAdded value: +[ + { + "type": "number" + }, + { + "type": "null" + } +] - added
Input schema / properties / irpf_rate / defaultAdded value: +null - removed
Input schema / properties / irpf_rate / typeRemoved value: -"number" - added
Input schema / properties / recargo_equivalencia_amount / anyOfAdded value: +[ + { + "type": "number" + }, + { + "type": "null" + } +] - added
Input schema / properties / recargo_equivalencia_amount / defaultAdded value: +null - changed
Input schema / properties / recargo_equivalencia_amount / descriptionPrevious value: -"Importe explĂcito del Recargo de Equivalencia. Si se omite, se calcula como base_imponible * recargo_equivalencia_rate / 100."New value: +"Importe explĂcito del Recargo de Equivalencia.\nSi se omite, se calcula como base_imponible * recargo_equivalencia_rate / 100." - removed
Input schema / properties / recargo_equivalencia_amount / typeRemoved value: -"number" - added
Input schema / properties / recargo_equivalencia_rate / anyOfAdded value: +[ + { + "type": "number" + }, + { + "type": "null" + } +] - added
Input schema / properties / recargo_equivalencia_rate / defaultAdded value: +null - removed
Input schema / properties / recargo_equivalencia_rate / typeRemoved value: -"number" - added
Input schema / properties / receiver_transaction_reference / anyOfAdded value: +[ + { + "type": "string" + }, + { + "type": "null" + } +] - added
Input schema / properties / receiver_transaction_reference / defaultAdded value: +null - changed
Input schema / properties / receiver_transaction_reference / descriptionPrevious value: -"ReceiverTransactionReference para facturas B2G."New value: +"ReceiverTransactionReference para\nfacturas B2G." - removed
Input schema / properties / receiver_transaction_reference / typeRemoved value: -"string" - added
Input schema / properties / resolution_reference / anyOfAdded value: +[ + { + "type": "string" + }, + { + "type": "null" + } +] - added
Input schema / properties / resolution_reference / defaultAdded value: +null - changed
Input schema / properties / resolution_reference / descriptionPrevious value: -"ResolutionReference para facturas B2G a Administraciones PĂşblicas."New value: +"ResolutionReference para facturas B2G a\nAdministraciones PĂşblicas." - removed
Input schema / properties / resolution_reference / typeRemoved value: -"string" - changed
Input schema / properties / tax_type / descriptionPrevious value: -"Impuesto indirecto aplicable a todas las lĂneas de la factura (IVA: penĂnsula/Baleares; IPSI: Ceuta/Melilla; IGIC: Canarias). No se admite mezclar impuestos en una misma factura. Por defecto: 'IVA'."New value: +"Impuesto indirecto aplicable a todas las lĂneas de la factura\n(IVA: penĂnsula/Baleares; IPSI: Ceuta/Melilla; IGIC: Canarias).\nNo se admite mezclar impuestos en una misma factura. Por defecto: 'IVA'." - removed
Input schema / properties / tax_type / enumRemoved value: -[ - "IVA", - "IPSI", - "IGIC" -] - changed
Output schema / (root)Previous value: -nullNew value: +{ + "additionalProperties": true, + "type": "object" +}
- Changed
es__generate_qr_verifactu2 fields changed- added
Input schema / additionalPropertiesAdded value: +false - changed
Output schema / (root)Previous value: -nullNew value: +{ + "additionalProperties": true, + "type": "object" +}
- Changed
es__generate_sii_correction11 fields changed- added
Input schema / additionalPropertiesAdded value: +false - added
Input schema / properties / corrected_invoice / anyOfAdded value: +[ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } +] - added
Input schema / properties / corrected_invoice / defaultAdded value: +null - changed
Input schema / properties / corrected_invoice / descriptionPrevious value: -"Datos corregidos. Omitir o null para una baja (A4)."New value: +"Datos corregidos. Omitir para una baja (A4)." - removed
Input schema / properties / corrected_invoice / typeRemoved value: -"object" - added
Input schema / properties / correction_type / descriptionAdded value: +"'A1' (modificaciĂłn) o 'A4' (baja)." - removed
Input schema / properties / correction_type / enumRemoved value: -[ - "A1", - "A4" -] - added
Input schema / properties / original_invoice / additionalPropertiesAdded value: +true - added
Input schema / properties / record_type / descriptionAdded value: +"'issued' o 'received'." - removed
Input schema / properties / record_type / enumRemoved value: -[ - "issued", - "received" -] - changed
Output schema / (root)Previous value: -nullNew value: +{ + "additionalProperties": true, + "type": "object" +}
- Changed
es__generate_verifactu_record26 fields changed- added
Input schema / additionalPropertiesAdded value: +false - added
Input schema / properties / calificacion_operacionAdded value: +{ + "default": "S1", + "description": "CalificacionOperacion (por defecto 'S1').", + "type": "string" +} - added
Input schema / properties / clave_regimenAdded value: +{ + "default": "01", + "description": "ClaveRegimenEspecialOTrascendencia (por defecto '01').", + "type": "string" +} - added
Input schema / properties / impuestoAdded value: +{ + "default": "01", + "description": "CĂłdigo de impuesto (por defecto '01' IVA).", + "type": "string" +} - added
Input schema / properties / invoice / additionalPropertiesAdded value: +true - added
Input schema / properties / invoice_type / defaultAdded value: +"F1" - changed
Input schema / properties / invoice_type / descriptionPrevious value: -"TipoFactura segĂşn HAC/1177/2024 Annex I."New value: +"TipoFactura segĂşn HAC/1177/2024 Annex I\n(F1, F2, F3, R1, R2, R3, R4, R5)." - removed
Input schema / properties / invoice_type / enumRemoved value: -[ - "F1", - "F2", - "F3", - "R1", - "R2", - "R3", - "R4", - "R5" -] - added
Input schema / properties / previous_emisor_nif / anyOfAdded value: +[ + { + "type": "string" + }, + { + "type": "null" + } +] - added
Input schema / properties / previous_emisor_nif / defaultAdded value: +null - changed
Input schema / properties / previous_emisor_nif / descriptionPrevious value: -"NIF del emisor del registro anterior (requerido si previous_hash está presente)."New value: +"NIF del emisor del registro anterior (requerido si\nprevious_hash está presente)." - removed
Input schema / properties / previous_emisor_nif / typeRemoved value: -"string" - added
Input schema / properties / previous_fecha / anyOfAdded value: +[ + { + "type": "string" + }, + { + "type": "null" + } +] - added
Input schema / properties / previous_fecha / defaultAdded value: +null - changed
Input schema / properties / previous_fecha / descriptionPrevious value: -"FechaExpedicionFactura del registro anterior en DD-MM-YYYY (requerido si previous_hash está presente)."New value: +"FechaExpedicionFactura del registro anterior en DD-MM-YYYY\n(requerido si previous_hash está presente)." - removed
Input schema / properties / previous_fecha / typeRemoved value: -"string" - added
Input schema / properties / previous_hash / anyOfAdded value: +[ + { + "type": "string" + }, + { + "type": "null" + } +] - added
Input schema / properties / previous_hash / defaultAdded value: +null - changed
Input schema / properties / previous_hash / descriptionPrevious value: -"Huella SHA-256 del registro precedente (omitir o null para el primero)."New value: +"Huella SHA-256 del registro precedente (omitir para el primero)." - removed
Input schema / properties / previous_hash / typeRemoved value: -"string" - added
Input schema / properties / previous_num_serie / anyOfAdded value: +[ + { + "type": "string" + }, + { + "type": "null" + } +] - added
Input schema / properties / previous_num_serie / defaultAdded value: +null - changed
Input schema / properties / previous_num_serie / descriptionPrevious value: -"NumSerieFactura del registro anterior (requerido si previous_hash está presente)."New value: +"NumSerieFactura del registro anterior (requerido si\nprevious_hash está presente)." - removed
Input schema / properties / previous_num_serie / typeRemoved value: -"string" - changed
Input schema / requiredPrevious value: -[ - "invoice", - "software_id", - "software_nif", - "invoice_type" -]New value: +[ + "invoice", + "software_id", + "software_nif" +] - changed
Output schema / (root)Previous value: -nullNew value: +{ + "additionalProperties": true, + "type": "object" +}
- Changed
es__get_compliance_status9 fields changed- added
Input schema / additionalPropertiesAdded value: +false - added
Input schema / properties / annual_turnover_eur / anyOfAdded value: +[ + { + "type": "number" + }, + { + "type": "null" + } +] - added
Input schema / properties / annual_turnover_eur / defaultAdded value: +null - changed
Input schema / properties / annual_turnover_eur / descriptionPrevious value: -"Volumen anual de operaciones IVA en EUR (para umbral SII > €6M)."New value: +"Volumen anual de operaciones IVA en EUR\n(para umbral SII > €6M)." - removed
Input schema / properties / annual_turnover_eur / typeRemoved value: -"number" - changed
Input schema / properties / entity_type / descriptionPrevious value: -"Tipo de obligado tributario."New value: +"Tipo de obligado tributario: 'IS' o 'IRPF'." - removed
Input schema / properties / entity_type / enumRemoved value: -[ - "IS", - "IRPF" -] - removed
Input schema / properties / province_code / patternRemoved value: -"^[0-9]{1,2}$" - changed
Output schema / (root)Previous value: -nullNew value: +{ + "additionalProperties": true, + "type": "object" +}
- Changed
es__get_face_invoice_status2 fields changed- added
Input schema / additionalPropertiesAdded value: +false - changed
Output schema / (root)Previous value: -nullNew value: +{ + "additionalProperties": true, + "type": "object" +}
- Changed
es__parse_aeat_response3 fields changed- added
Input schema / additionalPropertiesAdded value: +false - removed
Input schema / properties / response_type / enumRemoved value: -[ - "verifactu", - "sii" -] - changed
Output schema / (root)Previous value: -nullNew value: +{ + "additionalProperties": true, + "type": "object" +}
- Changed
es__query_sii_status12 fields changed- added
Input schema / additionalPropertiesAdded value: +false - added
Input schema / properties / emisor_nif / anyOfAdded value: +[ + { + "type": "string" + }, + { + "type": "null" + } +] - added
Input schema / properties / emisor_nif / defaultAdded value: +null - removed
Input schema / properties / emisor_nif / typeRemoved value: -"string" - added
Input schema / properties / invoice_number / anyOfAdded value: +[ + { + "type": "string" + }, + { + "type": "null" + } +] - added
Input schema / properties / invoice_number / defaultAdded value: +null - changed
Input schema / properties / invoice_number / descriptionPrevious value: -"NumSerieFacturaEmisor para filtrar por factura concreta (opcional)."New value: +"NumSerieFacturaEmisor para filtrar por factura concreta\n(opcional)." - removed
Input schema / properties / invoice_number / typeRemoved value: -"string" - added
Input schema / properties / record_type / defaultAdded value: +"issued" - removed
Input schema / properties / record_type / enumRemoved value: -[ - "issued", - "received" -] - changed
Input schema / requiredPrevious value: -[ - "nif_titular", - "nombre_titular", - "fiscal_year", - "period", - "record_type" -]New value: +[ + "nif_titular", + "nombre_titular", + "fiscal_year", + "period" +] - changed
Output schema / (root)Previous value: -nullNew value: +{ + "additionalProperties": true, + "type": "object" +}
- Changed
es__query_verifactu_status7 fields changed- added
Input schema / additionalPropertiesAdded value: +false - changed
Input schema / properties / invoice_date / descriptionPrevious value: -"Fecha de la factura consultada, YYYY-MM-DD (determina PeriodoImputacion)."New value: +"Fecha de la factura consultada, YYYY-MM-DD (determina\nPeriodoImputacion)." - added
Input schema / properties / num_serie_factura / anyOfAdded value: +[ + { + "type": "string" + }, + { + "type": "null" + } +] - added
Input schema / properties / num_serie_factura / defaultAdded value: +null - changed
Input schema / properties / num_serie_factura / descriptionPrevious value: -"NumSerieFactura a filtrar (omitir para consultar todo el perĂodo)."New value: +"NumSerieFactura a filtrar (omitir para consultar\ntodo el perĂodo)." - removed
Input schema / properties / num_serie_factura / typeRemoved value: -"string" - changed
Output schema / (root)Previous value: -nullNew value: +{ + "additionalProperties": true, + "type": "object" +}
- Changed
es__sign_facturae_xades15 fields changed- added
Input schema / additionalPropertiesAdded value: +false - added
Input schema / properties / cert_path / anyOfAdded value: +[ + { + "type": "string" + }, + { + "type": "null" + } +] - added
Input schema / properties / cert_path / defaultAdded value: +null - changed
Input schema / properties / cert_path / descriptionPrevious value: -"Ruta al certificado PKCS#12 (.p12 / .pfx). La contraseña se lee de AEAT_CERTIFICATE_PASSWORD (nunca como argumento de la tool)."New value: +"Ruta al certificado PKCS#12 (.p12 / .pfx). La contraseña se\nlee de AEAT_CERTIFICATE_PASSWORD (nunca como argumento de la tool)." - removed
Input schema / properties / cert_path / typeRemoved value: -"string" - added
Input schema / properties / confirmation_tokenAdded value: +{ + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Token de la respuesta awaiting_confirmation previa." +} - added
Input schema / properties / signature_policy_hash / anyOfAdded value: +[ + { + "type": "string" + }, + { + "type": "null" + } +] - added
Input schema / properties / signature_policy_hash / defaultAdded value: +null - removed
Input schema / properties / signature_policy_hash / typeRemoved value: -"string" - added
Input schema / properties / signature_policy_id / anyOfAdded value: +[ + { + "type": "string" + }, + { + "type": "null" + } +] - added
Input schema / properties / signature_policy_id / defaultAdded value: +null - changed
Input schema / properties / signature_policy_id / descriptionPrevious value: -"OID/URI de la polĂtica de firma. Por defecto: polĂtica Facturae (Orden EHA/962/2007)."New value: +"OID/URI de la polĂtica de firma. Por defecto:\npolĂtica Facturae (Orden EHA/962/2007)." - removed
Input schema / properties / signature_policy_id / typeRemoved value: -"string" - changed
Input schema / requiredPrevious value: -[ - "xml", - "cert_path" -]New value: +[ + "xml" +] - changed
Output schema / (root)Previous value: -nullNew value: +{ + "additionalProperties": true, + "type": "object" +}
- Changed
es__submit_sii_batch5 fields changed- added
Input schema / additionalPropertiesAdded value: +false - added
Input schema / properties / confirmation_tokenAdded value: +{ + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Token de la respuesta awaiting_confirmation previa." +} - added
Input schema / properties / record_type / descriptionAdded value: +"'issued' o 'received'." - removed
Input schema / properties / record_type / enumRemoved value: -[ - "issued", - "received" -] - changed
Output schema / (root)Previous value: -nullNew value: +{ + "additionalProperties": true, + "type": "object" +}
- Changed
es__submit_to_face3 fields changed- added
Input schema / additionalPropertiesAdded value: +false - added
Input schema / properties / confirmation_tokenAdded value: +{ + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Token de la respuesta awaiting_confirmation previa." +} - changed
Output schema / (root)Previous value: -nullNew value: +{ + "additionalProperties": true, + "type": "object" +}
- Changed
es__submit_verifactu_to_aeat3 fields changed- added
Input schema / additionalPropertiesAdded value: +false - added
Input schema / properties / confirmation_tokenAdded value: +{ + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Token de la respuesta awaiting_confirmation previa." +} - changed
Output schema / (root)Previous value: -nullNew value: +{ + "additionalProperties": true, + "type": "object" +}
- Changed
es__validate_facturae_schema2 fields changed- added
Input schema / additionalPropertiesAdded value: +false - changed
Output schema / (root)Previous value: -nullNew value: +{ + "additionalProperties": true, + "type": "object" +}
- Changed
es__validate_verifactu_record2 fields changed- added
Input schema / additionalPropertiesAdded value: +false - changed
Output schema / (root)Previous value: -nullNew value: +{ + "additionalProperties": true, + "type": "object" +}
3 tool updates
v0.7.0- Changed
es__generate_facturae_xml8 fields changed- added
Input schema / properties / invoice_issuer_typeAdded value: +{ + "default": "EU", + "description": "EU (emisor=vendedor), EM (emisor=comprador), TE (tercero). Por defecto: 'EU'.", + "enum": [ + "EU", + "EM", + "TE" + ], + "type": "string" +} - added
Input schema / properties / irpf_amountAdded value: +{ + "description": "Importe de retenciĂłn IRPF a deducir del total de la factura.", + "type": "number" +} - added
Input schema / properties / irpf_rateAdded value: +{ + "description": "Tipo de retenciĂłn IRPF (%), emitido en TaxesWithheld.", + "type": "number" +} - added
Input schema / properties / recargo_equivalencia_amountAdded value: +{ + "description": "Importe explĂcito del Recargo de Equivalencia. Si se omite, se calcula como base_imponible * recargo_equivalencia_rate / 100.", + "type": "number" +} - added
Input schema / properties / recargo_equivalencia_rateAdded value: +{ + "description": "Tipo de Recargo de Equivalencia (%), si aplica.", + "type": "number" +} - added
Input schema / properties / receiver_transaction_referenceAdded value: +{ + "description": "ReceiverTransactionReference para facturas B2G.", + "type": "string" +} - added
Input schema / properties / resolution_referenceAdded value: +{ + "description": "ResolutionReference para facturas B2G a Administraciones PĂşblicas.", + "type": "string" +} - added
Input schema / properties / tax_typeAdded value: +{ + "default": "IVA", + "description": "Impuesto indirecto aplicable a todas las lĂneas de la factura (IVA: penĂnsula/Baleares; IPSI: Ceuta/Melilla; IGIC: Canarias). No se admite mezclar impuestos en una misma factura. Por defecto: 'IVA'.", + "enum": [ + "IVA", + "IPSI", + "IGIC" + ], + "type": "string" +}
- Added
es__query_verifactu_status - Changed
es__sign_facturae_xades2 fields changed- removed
Input schema / properties / cert_passwordRemoved value: -{ - "description": "Contraseña del certificado (omitir si sin protección).", - "type": "string" -} - changed
Input schema / properties / cert_path / descriptionPrevious value: -"Ruta al certificado PKCS#12 (.p12 / .pfx)."New value: +"Ruta al certificado PKCS#12 (.p12 / .pfx). La contraseña se lee de AEAT_CERTIFICATE_PASSWORD (nunca como argumento de la tool)."
6 tool updates
v0.2.0- Changed
es__cancel_verifactu_record5 fields changed- changed
Input schema / properties / issuer_name / descriptionPrevious value: -"Nombre/razĂłn social del emisor."New value: +"Nombre/razon social del emisor." - added
Input schema / properties / previous_emisor_nifAdded value: +{ + "description": "NIF del emisor del registro anterior (IDEmisorFactura en EncadenamientoFacturaAnteriorType).", + "type": "string" +} - added
Input schema / properties / previous_fechaAdded value: +{ + "description": "FechaExpedicionFactura del registro anterior en DD-MM-YYYY.", + "type": "string" +} - changed
Input schema / properties / previous_hash / descriptionPrevious value: -"Huella del Ăşltimo registro en la cadena."New value: +"Huella del ultimo registro en la cadena." - added
Input schema / properties / previous_num_serieAdded value: +{ + "description": "NumSerieFactura del registro anterior.", + "type": "string" +}
- Removed
es__generate_ticketbai_xml - Changed
es__generate_verifactu_record3 fields changed- added
Input schema / properties / previous_emisor_nifAdded value: +{ + "description": "NIF del emisor del registro anterior (requerido si previous_hash está presente).", + "type": "string" +} - added
Input schema / properties / previous_fechaAdded value: +{ + "description": "FechaExpedicionFactura del registro anterior en DD-MM-YYYY (requerido si previous_hash está presente).", + "type": "string" +} - added
Input schema / properties / previous_num_serieAdded value: +{ + "description": "NumSerieFactura del registro anterior (requerido si previous_hash está presente).", + "type": "string" +}
- Changed
es__query_sii_status9 fields changed- removed
Input schema / properties / batch_idRemoved value: -{ - "description": "Referencia del lote devuelta por es__submit_sii_batch.", - "type": "string" -} - added
Input schema / properties / emisor_nifAdded value: +{ + "description": "NIF del emisor para filtrar (opcional, solo para received).", + "type": "string" +} - added
Input schema / properties / fiscal_yearAdded value: +{ + "description": "Ejercicio fiscal (YYYY).", + "type": "integer" +} - added
Input schema / properties / invoice_numberAdded value: +{ + "description": "NumSerieFacturaEmisor para filtrar por factura concreta (opcional).", + "type": "string" +} - added
Input schema / properties / nif_titularAdded value: +{ + "description": "NIF del titular SII (obligado tributario).", + "type": "string" +} - added
Input schema / properties / nombre_titularAdded value: +{ + "description": "Nombre o razon social del titular.", + "type": "string" +} - added
Input schema / properties / periodAdded value: +{ + "description": "Periodo de liquidacion: '01'..'12' para mensual, o '0A' para anual.", + "type": "string" +} - added
Input schema / properties / record_type / descriptionAdded value: +"Tipo de registro: 'issued' (expedidas) o 'received' (recibidas)." - changed
Input schema / requiredPrevious value: -[ - "batch_id", - "record_type" -]New value: +[ + "nif_titular", + "nombre_titular", + "fiscal_year", + "period", + "record_type" +]
- Removed
es__submit_ticketbai - Removed
es__validate_ticketbai_schema
22 tool updates
v0.0.1- First observed
es__build_sii_invoice_record - First observed
es__cancel_verifactu_record - First observed
es__check_b2b_mandate_applicability - First observed
es__detect_regional_regime - First observed
es__generate_b2b_einvoice_es - First observed
es__generate_facturae_xml - First observed
es__generate_qr_verifactu - First observed
es__generate_sii_correction - First observed
es__generate_ticketbai_xml - First observed
es__generate_verifactu_record - First observed
es__get_compliance_status - First observed
es__get_face_invoice_status - First observed
es__parse_aeat_response - First observed
es__query_sii_status - First observed
es__sign_facturae_xades - First observed
es__submit_sii_batch - First observed
es__submit_ticketbai - First observed
es__submit_to_face - First observed
es__submit_verifactu_to_aeat - First observed
es__validate_facturae_schema - First observed
es__validate_ticketbai_schema - First observed
es__validate_verifactu_record
TDQS
Scored across 20 tools
The tools are grouped by distinct fiscal systems (VERI*FACTU, Facturae/FACe, SII, B2B), and each verb-object pair is clearly distinguishable. However, several high-level patterns overlap (multiple generate, validate, submit, query tools), and detect_regional_regime vs check_b2b_mandate_applicability both determine applicable regimes, requiring careful reading of descriptions.
All tool names follow an es__<verb>_<object> pattern consistently, using snake_case throughout. Minor variations like submit_to_face and generate_b2b_einvoice_es are still within the same predictable structure and do not break the convention.
Twenty tools sits at the upper boundary of a reasonable scope, but the server covers four distinct compliance domains (VERI*FACTU, FACe, SII, B2B) plus cross-cutting regime detection and response parsing. Each tool has a clear role, so the count is slightly heavy but justifiable.
The server provides generation, validation, submission, status querying, and correction/cancellation for all major Spanish e-invoicing systems, along with QR generation, schema validation, regime detection, and AEAT response parsing. No significant lifecycle gaps are apparent for its stated purpose.
Maintenance
Related MCP Connectors
Brazilian fiscal MCP server - issue NF-e, NFC-e, NFS-e, CT-e, MDF-e and DC-e via SEFAZ.
- Frihet ERPOAuthio.frihet
AI-native ERP MCP: ES/EU fiscal compliance (VeriFactu/TicketBAI/Facturae), invoicing, tax, banking
MCP server for Quaderno — tax-rate calculation, invoices, contacts, products, receipts & expenses.
MCP server for Codat — companies, connections, invoices, bills and financial statements.
Related MCP Servers
- AlicenseAqualityDmaintenanceMCP server for DACH e-invoicing. Create XRechnung (UBL) and ZUGFeRD 2.3 (Factur-X CII) invoices, validate against EN 16931 rules, extract data from XML, and convert between UBL, CII and JSON formats.622 npm2MIT
- AlicenseAqualityAmaintenanceModel Context Protocol (MCP) server for French Electronic Invoicing (NF XP Z12-013). Provide tools to validate, generate, and explore API specifications for PDP/OD interoperability.234Apache 2.0
- AlicenseAqualityAmaintenanceModel Context Protocol (MCP) server for Italian Electronic Invoicing (FatturaPA / SDI). Provide tools to validate, generate, and explore API specifications for Sistema di Interscambio (SDI) interoperability.431Apache 2.0
- AlicenseAqualityAmaintenanceModel Context Protocol (MCP) server for Belgian Electronic Invoicing (Peppol BIS 3.0 / PINT-BE / Mercurius). Provides tools to validate, generate, and transform UBL 2.1 e-invoices, and look up BCE/KBO enterprise data and Peppol participants.50Apache 2.0