Skip to main content
Glama

Factur-X: Generate & Validate E-Invoices

Extract e-invoice data

extract_invoice
Read-onlyIdempotent

Extract invoice parties, dates, lines, totals and VAT as JSON for bookkeeping or matching.

Use validate_invoice for compliance; this performs no OCR or recalculation. Supply one source:
nonblank xml overrides document_base64 without inspecting it, so omit xml to extract a PDF's
attachment. include_xml returns that selected source for archiving or validation, not XML
reconstructed from fields. Extracted fields need mapping before use as generate_invoice input.

Returns fields and format/profile metadata, plus PDF metadata for PDF input. Missing business values
remain null; numeric values are strings. Missing input, invalid base64, malformed/unrecognized XML
or a PDF without embedded XML returns a tool error, not an empty extraction.
Requires a trial, prepaid or subscription allowance via OAuth or API key; success consumes one
operation, errors consume none. Nothing is stored or sent.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
xmlNoCII or UBL XML as unencoded text.
include_xmlNoInclude source XML text in the result; this can substantially increase response size.
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 / 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. A PDF with no embedded e-invoice XML is a tool error, not an empty result. 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 / include_xml / description
      Previous value: -"When true, the result also includes the raw XML text, which can be large. Default false returns only the parsed fields (number, dates, parties, totals, VAT, lines)."New value: +"Include source XML text in the result; this can substantially increase response size."
    • 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. XML that is not well-formed or not an e-invoice is a tool error, not an empty fields object."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. A PDF with no embedded e-invoice XML is a tool error, not an empty result. 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. A PDF with no embedded e-invoice XML is a tool error, not an empty result. 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. XML that is not well-formed or not an e-invoice is a tool error, not an empty fields object."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. XML that is not well-formed or not an e-invoice is a tool error, not an empty fields object."
  3. Changed3 schema fields changed
    • 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. A PDF with no embedded e-invoice XML is a tool error, not an empty result. Omit both and the tool errors."
    • changedInput schema / properties / include_xml / description
      Previous value: -"Also return the raw XML text (large); default false returns only the parsed fields"New value: +"When true, the result also includes the raw XML text, which can be large. Default false returns only the parsed fields (number, dates, parties, totals, VAT, lines)."
    • 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. XML that is not well-formed or not an e-invoice is a tool error, not an empty fields object."
  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 / 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 / include_xml / description
      Previous value: -"Include the raw XML in the result"New value: +"Also return the raw XML text (large); default false returns only the parsed fields"
    • 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