Skip to main content
Glama

Spanish Facturae XSIG Parser API - E-Invoice to JSON

facturae_xsig_parser
Read-onlyIdempotent

Parse Spanish Facturae 3.2.x e-invoices, including XAdES-signed .xsig files (enveloped, enveloping, AutoFirma), into structured JSON: invoice number and series, issue date, seller and buyer with NIF and address, line items, output taxes and IRPF withholdings, totals, payment instalments with IBAN, and arithmetic checks. Verifies XMLDSig reference digests and the signature value, and returns the signer certificate, signing time and validity. XXE-safe deterministic parsing, zero AI, nothing stored. Usable from AI agents via MCP. Free: 5 calls/day per IP. Paid: Radar API key (from €15/mo at https://radarbg.com/pricing#starter via X-API-Key) or $0.01/call via x402 at https://radarbg.com/x402/facturae-xsig-parser.

Input Schema

NameRequiredDescriptionDefault
limitNoMaximum number of invoice lines to return per invoice (1-2000).
contentNoRaw Facturae XML or .xsig text. Provide either content or fileBase64.
fileNameNoOptional original file name.
fileBase64NoBase64-encoded .xsig or Facturae XML file (alternative to content, max 15 MB).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.3/5.0
Behavior5/5

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

Goes well past the readOnly/idempotent annotations: it discloses signature verification scope (XMLDSig reference digests plus signature value), that the signer certificate, signing time and validity are returned, that parsing is XXE-safe and deterministic with nothing stored, and the exact rate limits (5 calls/day per IP) and auth paths (X-API-Key or x402). This is the kind of operational detail an agent needs before committing to a call.

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 purpose and output shape in one long but well-structured sentence, then adds verification, safety and access details in short clauses. The pricing URL and x402 endpoint are useful for invocation but slightly bloat an otherwise dense, information-rich definition.

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?

No output schema exists, and the description compensates by enumerating the returned JSON sections and signature metadata, so an agent knows what comes back. The main residual gap is that the free-tier limit and paid-key mechanics are stated but the response envelope/error behavior is not, though this is minor for a stateless parser.

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

Parameters3/5

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

Schema description coverage is 100%, so the four parameters (content, fileBase64, fileName, limit) are already documented in the schema, and the description adds no syntax or format guidance beyond them. The phrase 'including XAdES-signed .xsig files' only obliquely signals the content-vs-fileBase64 input alternatives, so the baseline 3 applies.

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

Purpose5/5

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

States a specific verb and resource ('Parse Spanish Facturae 3.2.x e-invoices ... into structured JSON') and enumerates the output fields (invoice number/series, dates, parties with NIF, line items, taxes, IRPF withholdings, totals, payment instalments, arithmetic checks). The jurisdiction and format are named explicitly, which cleanly separates it from the Italian FatturaPA, Polish KSeF, and French Factur-X siblings.

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

Usage Guidelines4/5

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

The format specificity ('Spanish Facturae 3.2.x', XAdES .xsig, AutoFirma) makes it clear which documents belong here, and the access/pricing sentence tells an agent how to actually call it. It stops short of explicit when-not-to-use routing (e.g., 'for UBL or generic XML use e_invoice_reader / xml_to_json'), so the exclusions must be inferred from the named format.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources