Skip to main content
Glama

XRechnung & ZUGFeRD E-Invoice Validator API

xrechnung_validator
Read-onlyIdempotent

Validate German XRechnung 3.0 and ZUGFeRD / Factur-X EN 16931 XML e-invoices (UBL 2.1 and UN/CEFACT CII). Checks mandatory BT fields, Leitweg-ID buyer reference, seller VAT/tax ID, IBAN, currency, line-to-header VAT arithmetic and customization profile, returning structured pass/fail rules and extracted invoice metadata. 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.005/call via x402 at https://radarbg.com/x402/xrechnung-validator.

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "mode": "xrechnung",
      "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?><Invoice xmlns=\"urn:oasis:names:specification:ubl:schema:xsd:Invoice-2\" xmlns:cac=\"urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2\" xmlns:cbc=\"urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2\"><cbc:CustomizationID>urn:cen.eu:en16931:2017#compliant#urn:xeinkauf.de:kosit:xrechnung_3.0</cbc:CustomizationID><cbc:ProfileID>urn:fdc:peppol.eu:2017:poacc:billing:01:1.0</cbc:ProfileID><cbc:ID>RE-2026-0412</cbc:ID><cbc:IssueDate>2026-11-20</cbc:IssueDate><cbc:DueDate>2026-12-20</cbc:DueDate><cbc:InvoiceTypeCode>380</cbc:InvoiceTypeCode><cbc:DocumentCurrencyCode>EUR</cbc:DocumentCurrencyCode><cbc:BuyerReference>991-12345-67</cbc:BuyerReference><cac:AccountingSupplierParty><cac:Party><cac:PostalAddress><cbc:StreetName>Hauptstr. 1</cbc:StreetName><cbc:CityName>Berlin</cbc:CityName><cbc:PostalZone>10115</cbc:PostalZone><cac:Country><cbc:IdentificationCode>DE</cbc:IdentificationCode></cac:Country></cac:PostalAddress><cac:PartyTaxScheme><cbc:CompanyID>DE299123456</cbc:CompanyID><cac:TaxScheme><cbc:ID>VAT</cbc:ID></cac:TaxScheme></cac:PartyTaxScheme><cac:PartyLegalEntity><cbc:RegistrationName>Nordlicht Software GmbH</cbc:RegistrationName></cac:PartyLegalEntity><cac:Contact><cbc:Name>Max Muster</cbc:Name><cbc:Telephone>+4930123456</cbc:Telephone><cbc:ElectronicMail>billing@nordlicht.example</cbc:ElectronicMail></cac:Contact></cac:Party></cac:AccountingSupplierParty><cac:AccountingCustomerParty><cac:Party><cac:PostalAddress><cbc:CityName>Hamburg</cbc:CityName><cbc:PostalZone>20095</cbc:PostalZone><cac:Country><cbc:IdentificationCode>DE</cbc:IdentificationCode></cac:Country></cac:PostalAddress><cac:PartyLegalEntity><cbc:RegistrationName>Stadtwerke Demo GmbH</cbc:RegistrationName></cac:PartyLegalEntity></cac:Party></cac:AccountingCustomerParty><cac:PaymentMeans><cbc:PaymentMeansCode>58</cbc:PaymentMeansCode><cac:PayeeFinancialAccount><cbc:ID>DE89370400440532013000</cbc:ID></cac:PayeeFinancialAccount></cac:PaymentMeans><cac:TaxTotal><cbc:TaxAmount currencyID=\"EUR\">190.00</cbc:TaxAmount><cac:TaxSubtotal><cbc:TaxableAmount currencyID=\"EUR\">1000.00</cbc:TaxableAmount><cbc:TaxAmount currencyID=\"EUR\">190.00</cbc:TaxAmount><cac:TaxCategory><cbc:ID>S</cbc:ID><cbc:Percent>19</cbc:Percent><cac:TaxScheme><cbc:ID>VAT</cbc:ID></cac:TaxScheme></cac:TaxCategory></cac:TaxSubtotal></cac:TaxTotal><cac:LegalMonetaryTotal><cbc:LineExtensionAmount currencyID=\"EUR\">1000.00</cbc:LineExtensionAmount><cbc:TaxExclusiveAmount currencyID=\"EUR\">1000.00</cbc:TaxExclusiveAmount><cbc:TaxInclusiveAmount currencyID=\"EUR\">1190.00</cbc:TaxInclusiveAmount><cbc:PayableAmount currencyID=\"EUR\">1190.00</cbc:PayableAmount></cac:LegalMonetaryTotal><cac:InvoiceLine><cbc:ID>1</cbc:ID><cbc:InvoicedQuantity unitCode=\"HUR\">10</cbc:InvoicedQuantity><cbc:LineExtensionAmount currencyID=\"EUR\">1000.00</cbc:LineExtensionAmount><cac:Item><cbc:Name>ERP Advisory</cbc:Name><cac:ClassifiedTaxCategory><cbc:ID>S</cbc:ID><cbc:Percent>19</cbc:Percent><cac:TaxScheme><cbc:ID>VAT</cbc:ID></cac:TaxScheme></cac:ClassifiedTaxCategory></cac:Item><cac:Price><cbc:PriceAmount currencyID=\"EUR\">100.00</cbc:PriceAmount></cac:Price></cac:InvoiceLine></Invoice>"
    },
    "name": "xrechnung_validator"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeNoValidation profile: xrechnung (strict Leitweg-ID and German B2G/B2B rules) or zugferd.xrechnung
contentNoRaw XRechnung or ZUGFeRD XML invoice string (UBL 2.1 or CII). Provide either content or fileBase64.
fileBase64NoBase64-encoded XML e-invoice file (alternative to content, max 15 MB).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnly/openWorld/idempotent, yet the description still adds substantial operational context: free tier capped at 5 calls/day per IP, paid access via X-API-Key, and an x402 per-call price with endpoints. It also states the return shape ('structured pass/fail rules and extracted invoice metadata'). It does not describe error behavior or what happens when XML is malformed/unparseable, which keeps it at 4.

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 the validation target and rule set in one dense sentence, then access/pricing. No filler sentences, though the pricing URL and x402 endpoint are somewhat promotional and could be compressed.

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?

With no output schema, the description still tells the agent what comes back (pass/fail rules plus extracted metadata), what inputs are accepted, and what auth/quota/cost constraints apply. Nothing material for correct invocation is missing.

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% and the schema itself explains mode enum, content vs fileBase64, and the 15 MB cap. The description only restates the supported syntax families (UBL 2.1 / CII) and does not add guidance such as which mode to pick for a CII document — baseline 3.

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?

Opens with a specific verb+resource: 'Validate German XRechnung 3.0 and ZUGFeRD / Factur-X EN 16931 XML e-invoices (UBL 2.1 and UN/CEFACT CII)', and enumerates the concrete rule families checked (BT fields, Leitweg-ID, VAT ID, IBAN, VAT arithmetic, profile). It does not explicitly differentiate itself from the sibling e_invoice_reader, whose territory ('extracted invoice metadata') it partly overlaps, 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 implied by the rule list (use this when you need compliance pass/fail on a German e-invoice), and the free/paid tiers tell the agent what credentials are needed. But there is no explicit when-to-use/when-not statement and no named alternative for the reader-vs-validator decision.

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