Skip to main content
Glama

UBL / XRechnung / Peppol invoice to PDF API - printable A4 PDF with totals and arithmetic checks

ubl_invoice_to_pdf
Read-onlyIdempotent

Turn one e-invoice (UBL 2.1 Invoice or CreditNote, Peppol BIS Billing 3.0, XRechnung UBL or CII, or a ZUGFeRD / Factur-X PDF with the XML inside) into a clean A4 PDF: seller and buyer with VAT ID and e-invoice address, every line, VAT breakdown, totals, IBAN and payment terms. Labels in English, German, French or Dutch (auto = seller's country). Returns the PDF as base64 plus the parsed header, totals and arithmetic checks. DOCTYPE / ENTITY refused. Deterministic, 0 AI, nothing stored. 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/ubl-invoice-to-pdf.

Input Schema

NameRequiredDescriptionDefault
xmlNoThe e-invoice as XML text (required unless fileContent is provided)
langNoLanguage of the PDF labels; auto = from the seller's country (DE/AT/CH -> de, FR -> fr, NL/BE -> nl, else en)auto
fileNameNoOptional file name, e.g. R-2026-1187.xml
fileContentNoOr the .xml / ZUGFeRD .pdf base64-encoded (max 10 MB)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / examples
      Previous value: -[
      -  {
      -    "lang": "auto"
      -  }
      -]New value: +[
      +  {
      +    "lang": "auto",
      +    "xml": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<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\">\n<cbc:CustomizationID>urn:cen.eu:en16931:2017#compliant#urn:xeinkauf.de:kosit:xrechnung_3.0</cbc:CustomizationID>\n<cbc:ProfileID>urn:fdc:peppol.eu:2017:poacc:billing:01:1.0</cbc:ProfileID>\n<cbc:ID>R-2026-1187</cbc:ID><cbc:IssueDate>2026-11-03</cbc:IssueDate><cbc:DueDate>2026-11-17</cbc:DueDate><cbc:InvoiceTypeCode>380</cbc:InvoiceTypeCode>\n<cbc:Note>Vielen Dank für Ihren Auftrag. Grüße aus Köln – Größe ÄÖÜ ß.</cbc:Note>\n<cbc:DocumentCurrencyCode>EUR</cbc:DocumentCurrencyCode><cbc:BuyerReference>04011000-1234512345-06</cbc:BuyerReference>\n<cac:InvoicePeriod><cbc:StartDate>2026-10-01</cbc:StartDate><cbc:EndDate>2026-10-31</cbc:EndDate></cac:InvoicePeriod>\n<cac:OrderReference><cbc:ID>PO-77812</cbc:ID></cac:OrderReference>\n<cac:AccountingSupplierParty><cac:Party><cbc:EndpointID schemeID=\"EM\">rechnung@muster-beratung.example</cbc:EndpointID>\n<cac:PartyName><cbc:Name>Müller &amp; Söhne Beratung GmbH</cbc:Name></cac:PartyName>\n<cac:PostalAddress><cbc:StreetName>Domstraße 12</cbc:StreetName><cbc:CityName>Köln</cbc:CityName><cbc:PostalZone>50667</cbc:PostalZone><cac:Country><cbc:IdentificationCode>DE</cbc:IdentificationCode></cac:Country></cac:PostalAddress>\n<cac:PartyTaxScheme><cbc:CompanyID>DE123456789</cbc:CompanyID><cac:TaxScheme><cbc:ID>VAT</cbc:ID></cac:TaxScheme></cac:PartyTaxScheme>\n<cac:PartyLegalEntity><cbc:RegistrationName>Müller &amp; Söhne Beratung GmbH</cbc:RegistrationName><cbc:CompanyID>HRB 12345 Köln</cbc:CompanyID></cac:PartyLegalEntity>\n<cac:Contact><cbc:Name>Anna Beispiel</cbc:Name><cbc:Telephone>+49 221 000000</cbc:Telephone><cbc:ElectronicMail>buchhaltung@muster-beratung.example</cbc:ElectronicMail></cac:Contact>\n</cac:Party></cac:AccountingSupplierParty>\n<cac:AccountingCustomerParty><cac:Party><cbc:EndpointID schemeID=\"0204\">04011000-1234512345-06</cbc:EndpointID>\n<cac:PartyName><cbc:Name>Stadtverwaltung Musterstadt</cbc:Name></cac:PartyName>\n<cac:PostalAddress><cbc:StreetName>Rathausplatz 2</cbc:StreetName><cbc:CityName>Leipzig</cbc:CityName><cbc:PostalZone>04109</cbc:PostalZone><cac:Country><cbc:IdentificationCode>DE</cbc:IdentificationCode></cac:Country></cac:PostalAddress>\n<cac:PartyLegalEntity><cbc:RegistrationName>Stadtverwaltung Musterstadt</cbc:RegistrationName></cac:PartyLegalEntity>\n</cac:Party></cac:AccountingCustomerParty>\n<cac:PaymentMeans><cbc:PaymentMeansCode>58</cbc:PaymentMeansCode><cbc:PaymentID>R-2026-1187</cbc:PaymentID>\n<cac:PayeeFinancialAccount><cbc:ID>DE02120300000000202051</cbc:ID><cbc:Name>Müller &amp; Söhne Beratung GmbH</cbc:Name><cac:FinancialInstitutionBranch><cbc:ID>BYLADEM1001</cbc:ID></cac:FinancialInstitutionBranch></cac:PayeeFinancialAccount></cac:PaymentMeans>\n<cac:PaymentTerms><cbc:Note>Zahlbar innerhalb von 14 Tagen ohne Abzug.</cbc:Note></cac:PaymentTerms>\n<cac:TaxTotal><cbc:TaxAmount currencyID=\"EUR\">149.99</cbc:TaxAmount>\n<cac:TaxSubtotal><cbc:TaxableAmount currencyID=\"EUR\">760.00</cbc:TaxableAmount><cbc:TaxAmount currencyID=\"EUR\">144.40</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>\n<cac:TaxSubtotal><cbc:TaxableAmount currencyID=\"EUR\">79.80</cbc:TaxableAmount><cbc:TaxAmount currencyID=\"EUR\">5.59</cbc:TaxAmount><cac:TaxCategory><cbc:ID>S</cbc:ID><cbc:Percent>7</cbc:Percent><cac:TaxScheme><cbc:ID>VAT</cbc:ID></cac:TaxScheme></cac:TaxCategory></cac:TaxSubtotal>\n</cac:TaxTotal>\n<cac:LegalMonetaryTotal><cbc:LineExtensionAmount currencyID=\"EUR\">839.80</cbc:LineExtensionAmount><cbc:TaxExclusiveAmount currencyID=\"EUR\">839.80</cbc:TaxExclusiveAmount>\n<cbc:TaxInclusiveAmount currencyID=\"EUR\">989.79</cbc:TaxInclusiveAmount><cbc:PrepaidAmount currencyID=\"EUR\">100.00</cbc:PrepaidAmount><cbc:PayableAmount currencyID=\"EUR\">889.79</cbc:PayableAmount></cac:LegalMonetaryTotal>\n<cac:InvoiceLine><cbc:ID>1</cbc:ID><cbc:InvoicedQuantity unitCode=\"HUR\">8</cbc:InvoicedQuantity><cbc:LineExtensionAmount currencyID=\"EUR\">760.00</cbc:LineExtensionAmount><cac:Item><cbc:Description>Projekt Umstellung E-Rechnung</cbc:Description><cbc:Name>Beratung Oktober 2026</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\">95.00</cbc:PriceAmount></cac:Price></cac:InvoiceLine><cac:InvoiceLine><cbc:ID>2</cbc:ID><cbc:InvoicedQuantity unitCode=\"C62\">2</cbc:InvoicedQuantity><cbc:LineExtensionAmount currencyID=\"EUR\">79.80</cbc:LineExtensionAmount><cac:Item><cbc:Name>Fachbuch E-Rechnung in der Praxis</cbc:Name><cac:ClassifiedTaxCategory><cbc:ID>S</cbc:ID><cbc:Percent>7</cbc:Percent><cac:TaxScheme><cbc:ID>VAT</cbc:ID></cac:TaxScheme></cac:ClassifiedTaxCategory></cac:Item><cac:Price><cbc:PriceAmount currencyID=\"EUR\">39.90</cbc:PriceAmount></cac:Price></cac:InvoiceLine>\n</Invoice>"
      +  }
      +]
    • changedInput schema / properties / xml / description
      Previous value: -"The e-invoice as XML text (empty = built-in XRechnung UBL sample with 2 VAT rates)"New value: +"The e-invoice as XML text (required unless fileContent is provided)"
  2. Added

TDQS

A4.4/5.0
Behavior5/5

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

Goes well past the annotations (readOnly/idempotent/openWorld) by disclosing security handling ('DOCTYPE / ENTITY refused'), determinism ('0 AI'), data retention ('nothing stored'), and the complete cost model (5 calls/day per IP free, paid via X-API-Key or x402 per-call). It also describes the response payload shape (base64 PDF plus parsed header, totals, arithmetic checks), which annotations cannot convey.

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?

A single dense paragraph, front-loaded with the conversion action and input formats before moving to output, safety, and pricing. Nearly every clause carries information an agent needs, though the inline pricing URL and '€15/mo' detail add bulk that could be trimmed without losing selection value.

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 explains the return value (base64 PDF plus parsed header, totals and arithmetic checks). Input size limits, security refusals, determinism, retention, and authentication/pricing paths are all covered, leaving nothing an agent needs in order to call this tool correctly.

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 each of the four parameters is already documented in the schema, including the lang enum and the xml-vs-fileContent alternative. The description reinforces the input alternatives (raw XML vs. ZUGFeRD PDF with XML inside) and the label-language behavior, but adds no syntax or format detail beyond what the schema provides, so the baseline of 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 ('turn one e-invoice ... into a clean A4 PDF') and enumerates exactly which input formats are accepted (UBL 2.1 Invoice/CreditNote, Peppol BIS 3.0, XRechnung UBL/CII, ZUGFeRD/Factur-X PDF with embedded XML). This clearly distinguishes it from sibling tools like e_invoice_reader (extraction only) or invoice_generator (creation), so an agent can select it without opening 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 Guidelines4/5

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

The use case is unambiguous — convert an existing e-invoice into a printable PDF with totals and arithmetic checks — and the accepted input families give the agent a concrete eligibility test. It does not, however, explicitly name an alternative for the read-only case (e.g., 'use e_invoice_reader if you only need the parsed data') or state when this tool should be avoided, so it falls short of full when/when-not guidance.

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