Skip to main content
Glama
FacturX (Factur-X / ZUGFeRD e-invoicing)

FacturX (Factur-X / ZUGFeRD e-invoicing)

facturx_convert

Idempotent

Converts an invoice to Factur-X/ZUGFeRD PDF and XML files after a successful dry run, returning paths, sizes and SHA-256 hashes. Use it to produce validated e-invoice files.

Instructions

Final conversion: COSTS 1 invoice of the account quota (refunded by the API when no file is produced). Call it only after facturx_dry_run returned ready=true. Writes factur-x.pdf and factur-x.xml into out_dir and returns their paths, sizes, sha256, the verified target and the idempotency_key. If the call fails without an answer, call again with the SAME idempotency_key: the API will not charge twice.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "invoice": "<invoice>",
      "out_dir": "<out_dir>"
    },
    "name": "facturx_convert"
  }
}

Input Schema

NameRequiredDescriptionDefault
outputNofacturx_pdfa3
invoiceYes
out_dirYes
idempotency_keyNo
validation_targetNoen16931

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.2

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the annotations, it discloses quota consumption, refund behavior when no file is produced, file outputs written to out_dir, returned metadata, and the no-double-charge retry behavior. This adds substantial operational context while remaining consistent with idempotentHint=true and destructiveHint=false.

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 front-loaded with the core action and cost warning, followed by prerequisite, outputs, and retry instructions. Every sentence adds operational value, and there is no redundant wording.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers the critical behavior an agent needs for a costly conversion: prerequisite, quota, output files, returned metadata, and safe retry. Output schema existence reduces the need to explain return values, but the missing explanation of required invoice structure and optional output/validation_target settings keeps it from being fully complete.

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 0%, so the description must carry parameter meaning. It explains out_dir as the destination and idempotency_key as the retry key, but leaves invoice, output, and validation_target undocumented; invoice is a required nested object with no field-level guidance.

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 states a specific verb and resource: final conversion to Factur-X files. It also explicitly distinguishes the tool from the sibling prerequisite facturx_dry_run, so an agent can identify its role 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 Guidelines5/5

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

It gives an explicit precondition: call only after facturx_dry_run returned ready=true. It also gives retry guidance for failed calls without an answer, naming the same idempotency_key requirement.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.