Skip to main content
Glama

Embed Factur-X XML into a PDF

embed_xml
Read-onlyIdempotent

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

Use when the PDF is produced by your own system and you only need the compliant hybrid file. Do not use
to create an invoice from data: call generate_invoice, which renders the PDF too. The XML is validated
first and rejected with rule ids if it fails. Nothing is stored. Returns a text summary plus the PDF/A-3
as a base64 embedded resource.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
xmlYesFactur-X / CII XML text for the same invoice; must pass the `check` rules or the tool fails
checkNoRule set the XML must pass before embedding: fr-ctc (default, France) or base (EN 16931 only)fr-ctc
languageNoDocument language written in the PDF metadata: fr or enfr
pdf_base64YesYour existing visual invoice PDF (any PDF, will be converted to PDF/A-3), base64 encoded

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 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"
  2. First observed

TDQS

A4.7/5.0
Behavior5/5

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

The description goes well beyond the annotations: it discloses that XML is validated first and rejected with rule ids, that nothing is stored, and that the return value is a text summary plus a base64-embedded PDF/A-3. These behaviors are not obvious from annotations alone and are valuable for the agent. No contradiction with readOnlyHint or idempotentHint exists.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is compact and front-loaded with the core operation, then immediately gives usage guidance, then covers validation, side effects, and return format in a few efficient sentences. Every sentence earns its place with no redundancy or fluff.

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?

For a tool with four parameters, no output schema, and a meaningful validation step, the description covers everything an agent needs: what the tool does, when to use it, what happens on validation failure, whether state is persisted, and what the response contains. No critical operational context 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%, so the schema already documents all parameters clearly. The description adds some context by framing the relationship between pdf_base64 and xml as the same invoice, and confirms the output format, but it does not significantly enrich parameter-level meaning beyond the schema.

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?

The description clearly states the specific operation: combining an existing visual PDF with a Factur-X/CII XML into a PDF/A-3 hybrid invoice. It names the exact input and output artifacts and differentiates itself from generate_invoice, leaving no ambiguity about what the tool does.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

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

The description explicitly says when to use this tool: when the PDF is already produced by the user's system and only the compliant hybrid file is needed. It also explicitly says what not to use it for and names the alternative generate_invoice, making the selection decision unambiguous.

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.

TDQS

A4.7/5.0
Disambiguation5/5

Each tool targets a distinct operation: embed_xml combines existing PDF and XML, extract_invoice reads invoice data, generate_invoice creates new invoices, and validate_invoice checks compliance. The descriptions explicitly cross-reference each other with 'do not use' guidance, eliminating ambiguity.

Naming Consistency5/5

All tool names follow the same verb_noun pattern in snake_case: embed_xml, extract_invoice, generate_invoice, validate_invoice. The naming is predictable and consistent across the entire set.

Tool Count5/5

Four tools cover the core e-invoicing operations without redundancy or bloat. The count is well-scoped for the server's purpose, fits within the typical 3-15 range, and each tool earns its place.

Completeness5/5

The set covers the full document lifecycle relevant to Factur-X: generate (create), extract (read), validate (check), and embed (combine). No obvious gaps exist; the server's stated stateless nature means additional CRUD operations are unnecessary.

Resources