Skip to main content
Glama

Factur-X: Generate & Validate E-Invoices

Validate your invoice document

validate_invoice
Read-onlyIdempotent

Check a Factur-X PDF, CII XML or UBL XML against EN 16931, and report the fields to fix.

Use when the caller supplies a document, including after corrections; use extract_invoice for business data.
With no document and only a request to try the product, choose view_invoice_demo instead.
Supply one source: nonblank xml overrides document_base64 without inspecting it. To check a PDF's
attachment, omit xml. check adds rules to the detected profile; it cannot change that profile.
Use base for non-French invoices to avoid French-field findings.

Returns validity and findings with rule ids and field pointers for explain_finding. XSD failures
skip schematron; inspect checks_skipped before treating validation as complete. Warnings alone do
not invalidate an invoice. Rule failures or a PDF without XML return valid=false; missing input,
invalid base64, malformed or unrecognized XML return a tool error.
Free without a key (shared daily limit, files up to 5 MB). With an OAuth connection or API key,
completed reports consume one operation even when invalid; tool errors do not.
No invoice is changed, stored or sent.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
xmlNoCII or UBL XML as unencoded text.
checkNofr-ctc: EN 16931 plus French CTC rules (BR-FR-*). base: EN 16931 only.fr-ctc
document_base64NoStandard base64 of a Factur-X PDF, CII XML or UBL XML file; no data-URI prefix.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedInput schema / properties / check / description
      Previous value: -"fr-ctc (default): EN 16931 plus French CTC rules (BR-FR-*). base: EN 16931 only. A failed rule is a normal result with valid false and findings, not a tool error."New value: +"fr-ctc: EN 16931 plus French CTC rules (BR-FR-*). base: EN 16931 only."
    • changedInput schema / properties / document_base64 / description
      Previous value: -"Base64 of a Factur-X PDF, or of a CII or UBL XML file. Give this or xml. If both are set, nonblank xml is used. Invalid base64 is a tool error. Omit both and the tool errors."New value: +"Standard base64 of a Factur-X PDF, CII XML or UBL XML file; no data-URI prefix."
    • changedInput schema / properties / xml / description
      Previous value: -"CII or UBL XML as plain text. Alternative to document_base64: give exactly one. If both are set, this value is used when nonblank. Well-formed XML that is not an e-invoice is a tool error."New value: +"CII or UBL XML as unencoded text."
  2. Changed2 schema fields changed
    • changedInput schema / properties / document_base64 / description
      Previous value: -"Base64 of a Factur-X PDF, or of a CII or UBL XML file. Give this or xml. If both are set, xml is used. Invalid base64 is a tool error. Omit both and the tool errors."New value: +"Base64 of a Factur-X PDF, or of a CII or UBL XML file. Give this or xml. If both are set, nonblank xml is used. Invalid base64 is a tool error. Omit both and the tool errors."
    • changedInput schema / properties / xml / description
      Previous value: -"CII or UBL XML as plain text. Alternative to document_base64: give exactly one. If both are set, this value is used. Well-formed XML that is not an e-invoice is a tool error."New value: +"CII or UBL XML as plain text. Alternative to document_base64: give exactly one. If both are set, this value is used when nonblank. Well-formed XML that is not an e-invoice is a tool error."
  3. Changed3 schema fields changed
    • changedInput schema / properties / check / description
      Previous value: -"fr-ctc (default): EN 16931 + French CTC rules (BR-FR-*). base: EN 16931 only."New value: +"fr-ctc (default): EN 16931 plus French CTC rules (BR-FR-*). base: EN 16931 only. A failed rule is a normal result with valid false and findings, not a tool error."
    • changedInput schema / properties / document_base64 / description
      Previous value: -"Factur-X PDF (the embedded XML is read), or a CII or UBL XML file, base64 encoded"New value: +"Base64 of a Factur-X PDF, or of a CII or UBL XML file. Give this or xml. If both are set, xml is used. Invalid base64 is a tool error. Omit both and the tool errors."
    • changedInput schema / properties / xml / description
      Previous value: -"CII or UBL XML as plain text; alternative to document_base64, give exactly one"New value: +"CII or UBL XML as plain text. Alternative to document_base64: give exactly one. If both are set, this value is used. Well-formed XML that is not an e-invoice is a tool error."
  4. Changed1 schema field changed
    • changedInput schema / properties / document_base64 / description
      Previous value: -"Factur-X PDF (the embedded XML is read) or a CII/UBL XML file, base64 encoded"New value: +"Factur-X PDF (the embedded XML is read), or a CII or UBL XML file, base64 encoded"
  5. Changed3 schema fields changed
    • changedInput schema / properties / check / description
      Previous value: -"EN 16931 base rules or + French CTC rules (default)"New value: +"fr-ctc (default): EN 16931 + French CTC rules (BR-FR-*). base: EN 16931 only."
    • changedInput schema / properties / document_base64 / description
      Previous value: -"Factur-X PDF or XML file, base64 encoded"New value: +"Factur-X PDF (the embedded XML is read) or a CII/UBL XML file, base64 encoded"
    • changedInput schema / properties / xml / description
      Previous value: -"CII or UBL XML as text (alternative to document_base64)"New value: +"CII or UBL XML as plain text; alternative to document_base64, give exactly one"
  6. First observed

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources