Skip to main content
Glama
verifactu-mcp

verifactu-mcp

by ArceeDev

verifactu-mcp

MCP server for Spanish invoicing compliance, built for AI agents working for gestorías, accountants and invoicing-software teams. Offline and stateless: nothing is stored and nothing is sent to the AEAT.

  • Audit VERI*FACTU chains: recompute the SHA-256 fingerprint (huella) of every record (alta and anulación) exactly as the AEAT specifies, and check that each record links to the previous one. Works on JSON records or on the XML any invoicing program exports (validated against the official SuministroLR.xsd).

  • AEAT tax QR: URL and PNG/SVG image (error correction M) for VERI*FACTU and non-VERI*FACTU systems, production or test portal, with the printing rules.

  • Facturae 3.2.2: build an invoice from plain data (totals, VAT breakdown, IRPF withholding, recargo de equivalencia, DIR3 codes for FACe, IBAN) and validate any Facturae file: official XSD, the arithmetic FACe checks, NIFs, DIR3 roles and signature presence.

The fingerprint code is tested against the three reference vectors published by the AEAT.

Tools

Tool

Credits

What it does

validate_invoice_chain

3

Audit a chain of records (JSON, up to 20,000): fingerprints, links, PrimerRegistro, duplicates, cancellations of unknown invoices, timestamps, NIF/date/amount/TipoFactura formats. continues_from audits a chain in pieces.

validate_verifactu_xml

3

Same audit on exported XML (RegFactuSistemaFacturacion, SOAP envelope or any XML with RegistroAlta/RegistroAnulacion), plus XSD validation.

verifactu_hash

1

Fingerprint of one record, with the exact string hashed.

generate_verifactu_qr

1

Tax QR URL + image + printing rules.

build_facturae

3

Facturae 3.2.2 XML (unsigned) from plain invoice data, XSD-validated.

validate_facturae

2

XSD + arithmetic + NIF + DIR3 + signature check of a Facturae file.

verifactu_calendar

free

Deadlines in force and what is pending in the BOE, with sources.

check_qr_url, validate_nif, pricing, credits_balance

free

Helpers.

Unreadable or invalid input is never charged; a tool that fails after charging is refunded.

Related MCP server: BeeL MCP server

Install

Claude Desktop / Claude Code / Cursor (mcpServers entry):

{
  "verifactu": {
    "command": "uvx",
    "args": ["--from", "git+https://github.com/ArceeDev/verifactu-mcp", "verifactu-mcp"],
    "env": { "KEYFLINT_LICENSE": "LIC-...", "KEYFLINT_URL": "https://licenses.keyflint.dev" }
  }
}

Hosted (one server, many buyers): verifactu-mcp --http or the Dockerfile; each request carries Authorization: Bearer LIC-....

Environment: KEYFLINT_LICENSE, KEYFLINT_URL, KEYFLINT_PUBLIC_KEYS, KEYFLINT_CHECKOUT_URL, VERIFACTU_PRICES (e.g. validate_invoice_chain=5,build_facturae=4), VERIFACTU_MAX_BYTES (default 10 MB).

  • VERI*FACTU (RD 1007/2023, Orden HAC/1177/2024; dates from RD-ley 15/2025): 1 Jan 2027 for corporate income tax payers, 1 Jul 2027 for everyone else. Hacienda announced on 5 Oct 2026 a further delay to October 2028, not yet published in the BOE. Taxpayers on SII and the foral territories are out of scope.

  • Mandatory B2B e-invoicing (RD 238/2026, Orden HAC/1028/2026): 6 Oct 2027 for turnover above 8 M EUR, 6 Oct 2028 for the rest; EN 16931 in UBL, CII, EDIFACT or Facturae.

  • Facturae with XAdES signature is mandatory for invoices to public administrations through FACe.

verifactu_calendar returns this with sources. Always confirm in the BOE.

Scope and limits

  • Not an invoicing system (SIF): it keeps no records, sends nothing to the AEAT and does not replace the producer's declaración responsable. Use it to check what a SIF produced, or to prepare data.

  • build_facturae produces unsigned XML. Sign it (XAdES-EPES) with the issuer's certificate before sending to FACe or a B2B platform. Corrective invoices (InvoiceClass OR) and batches are validated but not built yet.

  • If a stored fingerprint only matches after removing trailing zeros from the amounts, it is reported as a warning (correcta_sin_ceros): the record was generated with amounts written differently from the XML.

Sources

  • AEAT, Detalle de las especificaciones técnicas para generación de la huella o hash de los registros de facturación (reference vectors in tests/test_core.py).

  • AEAT, Características del QR y especificaciones del servicio de cotejo.

  • AEAT web service schemas SuministroLR.xsd / SuministroInformacion.xsd, and Facturaev3_2_2.xsd (facturae.gob.es), bundled in src/verifactu_mcp/schemas/ with the W3C xmldsig schema.

Development

pip install -e '.[test]'
pytest -q

MIT licensed. The bundled XSD files belong to their publishers (AEAT, Ministerio de Hacienda, W3C).

Available Tools

11 tools
build_facturaeA
Read-onlyIdempotent

Build a Facturae 3.2.2 invoice (XML) from plain data, with totals computed and the official XSD checked.

invoice: number (max 20), series, issue_date, operation_date?, currency (EUR), description?, notes?, legal_literals? [text], receiver_contract_reference?, seller / buyer: nif, name (company name, or first name with first_surname/second_surname for a person), address, post_code, town, province, country (ISO alfa-3, default ESP), residence? (R/U/E), email?, phone?; buyer.face: {oficina_contable, organo_gestor, unidad_tramitadora, organo_proponente?} DIR3 codes for public administration invoices (FACe), or administrative_centres: [{code, role 01-04, name?}], lines: [{description, quantity, unit_price, tax_rate (21, 10, 4, 0...), discount_pct?, surcharge_rate? (recargo de equivalencia 5.2, 1.4, 0.5), tax_type? (01 IVA, 03 IGIC, 02 IPSI), unit? (01 unidades), receiver_reference?, file_reference?, article_code?}], withholding?: {rate} (IRPF retention, e.g. 15 or 7), payment?: {due_date, method (transferencia, domiciliacion, efectivo, tarjeta...), iban, bic?}. Amounts accept "1.234,56" or "1234.56". Returns xml (UTF-8, unsigned), xml_base64, totals and the validation report. Invalid data is refused before charging. Sign the XML (XAdES) before sending to FACe.

NameRequiredDescriptionDefault
invoiceYes

Output Schema

NameRequiredDescription

No output parameters

TDQS

A4.5/5.0
Behavior4/5

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

Beyond the annotations it discloses that totals are computed, the official XSD is checked, invalid data is refused before charging, and the XML is returned unsigned and UTF-8. The credit-charge implication sits somewhat uneasily with readOnlyHint=true, but it is disclosure rather than contradiction, and the description adds real behavioral context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The first sentence front-loads purpose and outputs, and the long field listing is justified by the bare schema. The block is dense and compressed into a single unformatted slab, which costs some scannability, but no sentence is wasted.

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

Completeness5/5

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

For a complex nested builder the coverage is strong: field inventory, amount formatting ('1.234,56' or '1234.56'), tax/recargo enumerations, public-administration DIR3 codes, and the signing prerequisite. With an output schema present, return values are covered and the description still names xml, xml_base64, totals, and the validation report.

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

Parameters5/5

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

Schema coverage is 0% and the single parameter is an open object, so the description carries the full burden and does so with a detailed field map: required/optional fields, defaults (EUR, ESP), person-vs-company name shapes, DIR3/FACe face structure, line-level tax types and recargo rates, withholding, and payment blocks.

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

Purpose5/5

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

The description opens with a specific verb+resource+standard: build a Facturae 3.2.2 invoice as XML, with totals computed and XSD validation. It also implicitly separates itself from the sibling validate_facturae (build vs. validate) and from the verifactu_* tools by naming the FACe/Facturae domain.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage context is clear: it is for turning plain data into a signed-ready XML for FACe, and the closing sentence sets a downstream prerequisite ('Sign the XML (XAdES) before sending to FACe'). What is missing is explicit routing, e.g. when to prefer validate_facturae or whether this can replace a build+validate sequence.

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

check_qr_urlB
Read-onlyIdempotent

Check a tax QR URL read from an invoice: official AEAT host, path, parameters and formats. Free.

NameRequiredDescriptionDefault
urlYes

Output Schema

NameRequiredDescription

No output parameters

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint and openWorldHint=false, so the safety profile is covered. The description adds real value by listing the four validation dimensions (host, path, parameters, formats) and stating there is no cost, but it does not say what happens when the URL fails a check or whether validation is against a live AEAT service.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

One front-loaded sentence covering domain, validation scope and cost, with no filler. The trailing 'Free.' is terse but earns its place as a cost signal.

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

Completeness3/5

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

An output schema exists, so return values need not be explained, and the tool is simple with one parameter. Still missing is any failure-mode hint or sibling routing, which matters given a near-identical QR sibling in the toolset.

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

Parameters3/5

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

The single 'url' parameter has 0% schema description coverage, so the description must compensate. Specifying 'a tax QR URL read from an invoice' narrows the expected input domain, which helps, but it gives no format or shape hints for the string itself.

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

Purpose4/5

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

States a specific verb ('Check') and a precise resource ('a tax QR URL read from an invoice'), and enumerates what is validated: official AEAT host, path, parameters and formats. It does not name the obvious sibling generate_verifactu_qr, so the check-vs-generate distinction is left to inference.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

'read from an invoice' implies the input context, and 'Free' signals no credit cost, but there is no explicit when-to-use framing, no exclusions, and no pointer to generate_verifactu_qr when the agent needs to produce a QR rather than inspect one.

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

credits_balanceA
Read-only

Remaining credits on your KeyFlint license. Free.

NameRequiredDescriptionDefault

No parameters

Output Schema

NameRequiredDescription

No output parameters

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so the safety profile is covered. The description adds one genuinely new behavioral fact — that the call is free — but says nothing about whether the value is live or cached, or about any rate limiting on repeated polling.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two short fragments, front-loaded with the resource and followed by the cost note. Nothing is wasted, though the extreme terseness leaves room for a clarifying clause at no real length cost.

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

Completeness3/5

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

With no parameters, an existing output schema, and annotations covering safety, the definition is functionally sufficient to call the tool. It stops short of explaining what a credit represents or when the balance matters, leaving an agent without context for interpreting or acting on the result.

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

Parameters4/5

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

The tool takes zero parameters, so there is nothing for the description to disambiguate beyond what the empty schema already conveys. Baseline 4 applies.

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

Purpose4/5

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

States a specific resource and what it reports: the remaining credit balance on the KeyFlint license. An agent can identify it as a balance-lookup tool immediately. It does not differentiate itself from the adjacent 'pricing' sibling, which is the one tool an agent might plausibly confuse it with.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is only implied — the 'Remaining credits' framing suggests calling it to check a balance, and 'Free' hints it can be called without consuming credits. There is no explicit when-to-use statement, no prerequisite, and no comparison to alternatives such as 'pricing'.

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

generate_verifactu_qrA
Read-onlyIdempotent

Generate the AEAT tax QR ("QR tributario") of an invoice: URL and image.

Args: nif: Issuer NIF. numserie: Invoice series + number exactly as registered. fecha: Issue date (DD-MM-AAAA; AAAA-MM-DD and DD/MM/AAAA are converted). importe: ImporteTotal with decimal point, e.g. "241.40". verifactu: true for VERI*FACTU systems (ValidarQR), false for non-verifiable systems (ValidarQRNoVerifactu). environment: produccion (default) or pruebas (AEAT test portal). size_px: Image width in pixels (100-2000). image_format: png (default) or svg. The image uses error correction level M. print_rules says how it must appear on the invoice.

NameRequiredDescriptionDefault
nifYes
fechaYes
importeYes
size_pxNo
numserieYes
verifactuNo
environmentNoproduccion
image_formatNopng

Output Schema

NameRequiredDescription

No output parameters

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, and closed-world behavior, so the bar is lower, and the description still adds real context: 'environment' selects the AEAT production versus test portal, the verifactu flag selects between ValidarQR and ValidarQRNoVerifactu endpoints, and the image uses error correction level M. It does not mention failure modes such as invalid NIF or malformed numserie, keeping it from a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The one-line purpose statement is front-loaded and the Args block is dense with zero filler; every line adds information an agent needs. The docstring-style 'Args:' formatting is slightly machine-unfriendly, but nothing is redundant.

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

Completeness4/5

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

With an output schema present, the description does not need to enumerate return fields, and it still names URL and image plus the print_rules guidance. For an 8-parameter tool with rich format requirements, this is close to complete; only error behavior and the relationship to sibling validation tools are absent.

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

Parameters5/5

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

Schema description coverage is 0%, so the description must carry all parameter meaning, and it does: date format conversions (AAAA-MM-DD and DD/MM/AAAA accepted), importe requiring a decimal point with an example, size_px bounds 100-2000, image_format png/svg, and the semantic distinction behind the verifactu boolean. This is meaningfully more than the bare schema titles.

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

Purpose4/5

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

The description opens with a specific verb and resource: 'Generate the AEAT tax QR (QR tributario) of an invoice: URL and image.' This tells the agent exactly what comes back. It does not explicitly contrast itself with the sibling 'check_qr_url', so it stops short of a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is only implied: the agent can infer this is for producing the QR that must appear on an invoice, and the 'verifactu' flag hints at which system configuration applies. There is no explicit statement of when to use this versus check_qr_url or verifactu_hash, and no exclusion or prerequisite is named.

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

pricingA
Read-only

Credit price of each tool and where to buy credits. Free.

NameRequiredDescriptionDefault

No parameters

Output Schema

NameRequiredDescription

No output parameters

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so the safety profile is covered. The description adds one behavioral fact — 'Free' — suggesting calling this tool costs no credits, which is genuinely useful context, but it is ambiguous (free tool vs. free credits) and says nothing about rate limits or how prices are kept current.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two short front-loaded fragments with no wasted words. The terseness does cost some precision — 'Free.' is a bare fragment whose referent is unclear — but structure is efficient.

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

Completeness4/5

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

An output schema exists, so return values need not be described, and a parameterless informational tool has little else to specify. The remaining gap is the ambiguity of the pricing units and of 'Free', which a slightly fuller sentence could resolve.

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

Parameters4/5

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

The tool takes zero parameters, so the baseline is 4; with nothing to document, the schema and description together are sufficient. No meaningful parameter context is missing.

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

Purpose4/5

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

The description names a specific resource (credit price of each tool) and a secondary output (where to buy credits), which is distinguishable from the sibling credits_balance that reports a balance rather than prices. It is telegraphic but an agent can tell what it returns without reading the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is only implied: an agent would consult this to learn per-tool credit costs or where to top up. There is no explicit when-to-use statement, no mention of credits_balance as the alternative for checking remaining credits, and no stated prerequisites.

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

validate_facturaeA
Read-onlyIdempotent

Validate a Facturae 3.2.2 file (.xml or signed .xsig) before sending it to FACe or a client.

Checks the official XSD, the arithmetic FACe checks (line amounts, tax quotas, header vs line bases, totals, batch totals, installments), NIFs of resident parties, the three DIR3 codes for public administrations, and whether the file is signed. Files that are not Facturae are not charged.

NameRequiredDescriptionDefault
contentNo
content_base64No

Output Schema

NameRequiredDescription

No output parameters

TDQS

A3.9/5.0
Behavior4/5

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

Adds real behavior beyond the annotations: the specific check families performed (XSD, arithmetic FACe checks, NIF, DIR3 codes, signature presence) and the billing caveat that non-Facturae files are not charged. Annotations already cover read-only/idempotent/closed-world safety, and the output schema covers results, so this is solid but stops short of describing failure modes or severity reporting.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with purpose in the first sentence, then a compact enumeration of checks. The single long sentence listing checks is dense but every clause conveys a distinct validation category, so little is wasted.

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

Completeness3/5

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

The existence of an output schema relieves the description of explaining return values, and the check list is thorough. However, with zero required parameters and two empty-defaulted content fields, the description gives no guidance on which field to populate or what happens when both are empty, which is a genuine gap for correct invocation.

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

Parameters2/5

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

Schema description coverage is 0% and both parameters (content, content_base64) are undocumented, yet the description never clarifies which one accepts raw XML versus base64-encoded data, nor how a signed .xsig should be supplied. The only hint is the file-format mention, which does not map to a parameter.

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

Purpose5/5

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

States a specific verb (validate), a specific resource (Facturae 3.2.2 .xml/.xsig), and the target destination (FACe or a client). This clearly separates it from siblings like build_facturae or validate_verifactu_xml without the agent needing to open a schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives clear timing context ('before sending it to FACe or a client') and enumerates the check categories, so the agent knows when this tool is applicable. It does not explicitly exclude or route against sibling validators (validate_verifactu_xml, validate_invoice_chain), which keeps it 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.

validate_invoice_chainA
Read-onlyIdempotent

Audit a VERI*FACTU chain of records (in generation order) given as JSON objects.

Each record has the fields of verifactu_hash plus Huella (stored fingerprint) and optionally HuellaAnterior or RegistroAnterior {IDEmisorFactura, NumSerieFactura, FechaExpedicionFactura, Huella} and PrimerRegistro ("S"). For every record the fingerprint is recomputed and compared, and the link to the previous record checked. Reports chain breaks, altered records, PrimerRegistro misuse, duplicate invoices, cancellations of unknown invoices, timestamps going backwards, invalid NIF/dates/amounts/TipoFactura. continues_from: last fingerprint of the previous batch, to audit a chain in pieces. Up to 20,000 records. last_huella is what the next record must link to.

NameRequiredDescriptionDefault
recordsYes
continues_fromNo

Output Schema

NameRequiredDescription

No output parameters

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the readOnly/idempotent annotations by enumerating exactly what is checked and reported: fingerprint recomputation and comparison, previous-record link verification, PrimerRegistro misuse, duplicate invoices, cancellations of unknown invoices, backwards timestamps, and invalid NIF/dates/amounts/TipoFactura. It also discloses a concrete capacity limit (20,000 records) and explains continuation semantics, which is precisely the kind of behavioral context annotations cannot carry.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Purpose and input shape are front-loaded, and nearly every sentence carries load. The long comma-separated list of detected error classes is dense and reads as a run-on, and the trailing `continues_from` / `last_huella` sentences mix input-parameter and return-value concerns, slightly muddling the structure.

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

Completeness5/5

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

For a two-parameter, read-only audit tool with an output schema present, this covers what's needed: input record shape, ordering requirement, batch continuation, and a hard size limit. Return values needn't be re-explained given the output schema, so nothing material is missing.

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

Parameters4/5

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

Schema description coverage is 0% and the records item schema is a bare object with additionalProperties:true, so the description must carry the load — and it largely does, spelling out `Huella`, optional `HuellaAnterior`, the `RegistroAnterior` sub-fields, and `PrimerRegistro` ("S"), plus the meaning of `continues_from`. It loses a point because the referenced `verifactu_hash` fields are not enumerated here, forcing the agent to consult a sibling, and `last_huella` is described as an output-style field in ambiguous proximity to the input parameters.

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

Purpose5/5

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

Opens with a specific verb+resource+scope: "Audit a VERI*FACTU chain of records (in generation order) given as JSON objects." That distinguishes it clearly from siblings like verifactu_hash (single fingerprint) and validate_verifactu_xml (XML validation), so an agent can route correctly without opening a schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Tells the agent the prerequisite shape of the input (records in generation order, JSON objects) and gives an explicit batching workflow via continues_from for auditing "a chain in pieces." It also states the operational ceiling of 20,000 records. It stops short of explicitly naming which sibling to use for single-record hashing or XML input, so it earns a 4 rather than a 5.

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

validate_nifA
Read-onlyIdempotent

Check a Spanish NIF / NIE / CIF control character. Free.

NameRequiredDescriptionDefault
nifYes

Output Schema

NameRequiredDescription

No output parameters

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint and openWorldHint=false, so safety and determinism are covered without prose. The description adds one genuinely new behavioral fact — 'Free', i.e. no credit consumption — but says nothing about how format problems (dashes, lowercase, wrong length) are handled versus checksum failures. A 3 fits because annotations carry most of the burden and the text adds only marginal context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two terse fragments with the core action and resource front-loaded and the cost note appended. Nothing is redundant and the whole definition is scannable in one pass.

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

Completeness4/5

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

For a single-parameter, deterministic validator with an output schema and full annotation coverage, the description supplies what an agent needs to select and call it: the identifier family and the fact that it is free. The main residual gap is input-format expectations, though the output schema relieves the need to describe return values.

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

Parameters3/5

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

Schema description coverage is 0% for the single required parameter, which the schema only labels as a bare string titled 'Nif'. The description partially compensates by enumerating the accepted identifier types (NIF, NIE, CIF), which is real meaning beyond the schema. It still omits expected format details such as separators, case, or length, so compensation is incomplete.

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

Purpose4/5

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

States a concrete verb ('Check') and a precisely scoped resource ('Spanish NIF / NIE / CIF control character'), so an agent knows it validates tax-identifier checksums rather than performing a generic string check. It is clearly distinct by resource from sibling validators such as validate_facturae or validate_verifactu_xml, though it does not name those siblings explicitly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied by the resource name: call it when a Spanish tax ID needs verification. There is no explicit statement of when not to use it, no mention of alternatives for non-Spanish identifiers, and no prerequisites, so guidance stays at the implied level. The 'Free' note does hint at a cost consideration versus paid siblings, which is a small added signal.

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

validate_verifactu_xmlB
Read-onlyIdempotent

Audit VERI*FACTU XML exported by an invoicing program (RegFactuSistemaFacturacion, a SOAP envelope, or any XML holding RegistroAlta / RegistroAnulacion elements, in document order).

Validates RegFactuSistemaFacturacion against the official AEAT schema (SuministroLR.xsd) when present, then runs every chain and fingerprint check of validate_invoice_chain. XML that holds no records is not charged.

NameRequiredDescriptionDefault
contentNo
content_base64No
continues_fromNo

Output Schema

NameRequiredDescription

No output parameters

TDQS

B3.4/5.0
Behavior4/5

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

Annotations already declare read-only and idempotent, so the bar is lower. The description still adds real value: schema validation against SuministroLR.xsd happens 'when present' (i.e., conditionally), all chain and fingerprint checks are re-run, and empty-record XML is not billed — a billing behavior not visible in annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two short sentences plus a note, front-loaded with the verb and resource and then the validation steps in execution order. Minor line-wrapping aside, no filler sentences.

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

Completeness3/5

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

The output schema covers return values and annotations cover safety, so the remaining burden is input semantics and they are unaddressed. For a three-parameter tool with two mutually exclusive content fields, the definition leaves a material gap.

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

Parameters2/5

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

Schema description coverage is 0% across three parameters, so the description must carry parameter meaning and does not. It never explains whether to populate content versus content_base64, or what continues_from does (presumably resuming a chain across documents); an agent must guess.

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

Purpose4/5

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

Names a specific verb (Audit) and resource (VERI*FACTU XML) and enumerates the accepted document shapes (RegFactuSistemaFacturacion, SOAP envelope, raw RegistroAlta/RegistroAnulacion). It also positions itself relative to validate_invoice_chain by running that tool's checks on top of schema validation, though the wrapper relationship could be stated more directly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied by the accepted-format list and the note that empty XML is not charged, so an agent can infer this is for auditing exported invoice files. There is no explicit when-not guidance or statement of when to call validate_invoice_chain directly instead of this wrapper.

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

verifactu_calendarA
Read-only

Legal deadlines for VERI*FACTU and mandatory B2B e-invoicing in Spain, with sources and what is still pending publication. Free.

NameRequiredDescriptionDefault

No parameters

Output Schema

NameRequiredDescription

No output parameters

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so the safety profile is covered and the description's 'Free' note usefully adds cost/paywall context. It also discloses that results come with sources and indicate what is still pending publication, which tells the agent the data may be incomplete — but it says nothing about refresh cadence or how current the deadlines are, which matters for a time-sensitive legal calendar.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two short sentences with the resource and its coverage front-loaded, followed by the caveat about pending publication. The one-word 'Free.' fragment is slightly abrupt but carries real value about pricing, so nothing is wasted.

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

Completeness4/5

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

With no parameters and an output schema present, the description does not need to explain return values, and it is complete enough for an agent to call and correctly interpret the result. The only meaningful omission is the data's currency or last-updated status for a deadline-oriented tool.

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

Parameters4/5

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

There are zero parameters, so baseline is 4; the description appropriately spends no space on arguments. The only semantic risk — whether the calendar can be scoped by date, region, or business type — is not addressed, but with an empty schema there is nothing to clarify.

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

Purpose4/5

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

The description names the specific resource (legal deadlines for VERI*FACTU and mandatory B2B e-invoicing in Spain) and its scope, which is clearly distinct from the sibling tools that all validate, hash, or generate verification artifacts. It is not phrased as a verb, but the resource and its domain are unambiguous, so an agent can tell this is the informational lookup among the validation tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is only implied: an agent can infer this is the tool to call when it needs compliance dates rather than validation results. There is no explicit statement of when to use it, no exclusion of cases, and no reference to a sibling alternative or prerequisite, though in practice no sibling covers this information.

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

verifactu_hashA
Read-onlyIdempotent

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

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

NameRequiredDescriptionDefault
recordYes
previous_huellaNo

Output Schema

NameRequiredDescription

No output parameters

TDQS

A4.5/5.0
Behavior4/5

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

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

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

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

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

Completeness5/5

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

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

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

Parameters5/5

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

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

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

Purpose5/5

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

States a specific verb and resource: 'Compute the VERI*FACTU fingerprint (huella, SHA-256) of one invoicing record.' The scoping to a single record, plus the chain-link parameter, distinguishes it from sibling validate_invoice_chain and from generate_verifactu_qr without opening any schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

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

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

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 11 tool updatesv0.1.0
    • First observedbuild_facturae
    • First observedcheck_qr_url
    • First observedcredits_balance
    • First observedgenerate_verifactu_qr
    • First observedpricing
    • First observedvalidate_facturae
    • First observedvalidate_invoice_chain
    • First observedvalidate_nif
    • First observedvalidate_verifactu_xml
    • First observedverifactu_calendar
    • First observedverifactu_hash

TDQS

A3.8/5.0

Scored across 11 tools

Disambiguation4/5

Each tool targets a distinct artifact and action: hash one record, audit a JSON chain, audit an XML export, generate vs. check a QR, build vs. validate Facturae, check a NIF. The cluster verifactu_hash / validate_invoice_chain / validate_verifactu_xml is related but differentiated by input (single record, JSON array, XML file), and the descriptions make the boundaries explicit. Only slight residual risk that an agent picks validate_invoice_chain when it actually has XML, or verifactu_hash when it wants the whole chain.

Naming Consistency3/5

The dominant pattern is verb_noun (validate_invoice_chain, validate_verifactu_xml, validate_facturae, validate_nif, generate_verifactu_qr, build_facturae, check_qr_url). However verifactu_calendar and verifactu_hash are resource-first with no verb, and pricing / credits_balance are bare nouns, so conventions are mixed. Still readable overall, but not a predictable single scheme.

Tool Count5/5

11 tools is well inside the comfortable range and every tool earns its place: four free utility/meta tools (calendar, pricing, balance, NIF) plus seven paid domain operations. No obvious redundancy or filler.

Completeness4/5

The surface covers the full compliance lifecycle for Spanish e-invoicing: NIF validation, record hashing, chain and XML auditing, QR generation and verification, and Facturae build/validate with XSD checks. Minor gaps: there is no tool to emit the full VERI*FACTU submission XML or sign documents, and QR checking has no counterpart image-decoding step, but these are reasonably out of scope and workable around.

Maintenance

ActivityMaintained
ResponsivenessSyncing

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    C
    maintenance
    Provides access to official Spanish fiscal data and tools based on AEAT and BOE sources, covering income tax, VAT, and regional deductions. It enables AI assistants to answer tax-related queries and verify filing deadlines using verified information.
    10
    13 npm
    13
    MIT
  • A
    license
    A
    quality
    A
    maintenance
    Enables AI agents to issue, correct, and register legally compliant Spanish electronic invoices with AEAT VeriFactu, supporting F1/F2 types, R1–R5 correctives, and NIF validation from Claude, ChatGPT, Cursor, or VS Code.
    136
    293 npm
    2
    MIT
  • A
    license
    Not graded
    quality
    A
    maintenance
    Enables AI assistants to locally parse, validate, audit, explain, generate, and convert XRechnung and ZUGFeRD/Factur-X e-invoices using official rule sets, fully offline with no API keys required.
    Apache 2.0
  • A
    license
    A
    quality
    A
    maintenance
    Enables AI agents to validate Mexican RFC, CURP, CLABE and NSS identifiers with real check digits, parse CFDI 4.0 invoices with labelled SAT catalogue codes and verified totals, and query the SAT's public status service to see whether an invoice is still valid. It also generates coherent test people and companies, all read-only and without API keys, certificates or PAC contracts.
    9
    120 npm
    1
    MIT