Skip to main content
Glama

Factur-X: Generate & Validate E-Invoices

Embed CII XML into a PDF

embed_xml
Read-onlyIdempotent

Combine a visual PDF you already have with CII XML into one Factur-X PDF/A-3.

Use for an existing visual invoice; use generate_invoice to render invoice data or produce UBL.
Match the PDF's parties, lines and totals to xml yourself: check examines only XML and cannot detect
disagreement with the visible PDF. The embedded profile comes from xml; neither check nor language
changes it. language does not translate the PDF.

Invalid input or failed rules return a tool error with no file; rule errors include ids. For a
findings report use validate_invoice. Success returns a JSON summary (profile, size_bytes, warning
count) and a base64 PDF/A-3 resource. Requires a trial, prepaid or subscription allowance via OAuth or key; success consumes one document, errors
consume none. Nothing is stored or sent.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
xmlYesUnencoded CII XML text (Factur-X / EN 16931); UBL is not supported.
checkNoXML validation rules: fr-ctc adds French BR-FR-* to EN 16931; base uses EN 16931 only.fr-ctc
languageNoLanguage written in the PDF metadata: fr (default) or en.fr
pdf_base64YesStandard base64 of PDF bytes starting with %PDF-. Not a URL or data-URI.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / language / type
      Added value: +"string"
  2. Changed3 schema fields changed
    • changedInput schema / properties / check / description
      Previous value: -"Rule set the XML must pass before embedding: fr-ctc (default, EN 16931 plus French BR-FR-*) or base (EN 16931 only). A failed check is a tool error listing the rule ids, not a validation report, and no PDF is returned."New value: +"XML validation rules: fr-ctc adds French BR-FR-* to EN 16931; base uses EN 16931 only."
    • changedInput schema / properties / pdf_base64 / description
      Previous value: -"Required. Standard base64 of the visual invoice PDF. After decoding it must be a PDF (bytes start with %PDF-). Invalid base64 or a non-PDF is a tool error and no file is returned. The PDF is converted to PDF/A-3."New value: +"Standard base64 of PDF bytes starting with %PDF-. Not a URL or data-URI."
    • changedInput schema / properties / xml / description
      Previous value: -"Required. CII XML for the same invoice (Factur-X / EN 16931). UBL and any other flavor cannot be embedded: that is a tool error and no PDF is returned. The XML must pass `check` or the tool errors with the rule ids and returns no PDF."New value: +"Unencoded CII XML text (Factur-X / EN 16931); UBL is not supported."
  3. Changed4 schema fields changed
    • changedInput schema / properties / check / description
      Previous value: -"Rule set the XML must pass before embedding: fr-ctc (default, France) or base (EN 16931 only)"New value: +"Rule set the XML must pass before embedding: fr-ctc (default, EN 16931 plus French BR-FR-*) or base (EN 16931 only). A failed check is a tool error listing the rule ids, not a validation report, and no PDF is returned."
    • changedInput schema / properties / language / description
      Previous value: -"Document language written in the PDF metadata: fr or en"New value: +"Language written in the PDF metadata: fr (default) or en."
    • changedInput schema / properties / pdf_base64 / description
      Previous value: -"Your existing visual invoice PDF (any PDF, will be converted to PDF/A-3), base64 encoded"New value: +"Required. Standard base64 of the visual invoice PDF. After decoding it must be a PDF (bytes start with %PDF-). Invalid base64 or a non-PDF is a tool error and no file is returned. The PDF is converted to PDF/A-3."
    • changedInput schema / properties / xml / description
      Previous value: -"CII XML for the same invoice (Factur-X or EN 16931). It must pass the `check` rules or the tool fails"New value: +"Required. CII XML for the same invoice (Factur-X / EN 16931). UBL and any other flavor cannot be embedded: that is a tool error and no PDF is returned. The XML must pass `check` or the tool errors with the rule ids and returns no PDF."
  4. Changed1 schema field changed
    • changedInput schema / properties / xml / description
      Previous value: -"Factur-X / CII XML text for the same invoice; must pass the `check` rules or the tool fails"New value: +"CII XML for the same invoice (Factur-X or EN 16931). It must pass the `check` rules or the tool fails"
  5. Changed4 schema fields changed
    • changedInput schema / properties / check / description
      Previous value: -"Rule set to enforce before embedding"New value: +"Rule set the XML must pass before embedding: fr-ctc (default, France) or base (EN 16931 only)"
    • changedInput schema / properties / language / description
      Previous value: -"Document language metadata"New value: +"Document language written in the PDF metadata: fr or en"
    • changedInput schema / properties / pdf_base64 / description
      Previous value: -"Your visual invoice PDF, base64 encoded"New value: +"Your existing visual invoice PDF (any PDF, will be converted to PDF/A-3), base64 encoded"
    • changedInput schema / properties / xml / description
      Previous value: -"Factur-X / CII XML text (must pass EN 16931 rules)"New value: +"Factur-X / CII XML text for the same invoice; must pass the `check` rules or the tool fails"
  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