Skip to main content
Glama

InkVoice — XRechnung & E-Invoicing

Create an XRechnung

create_xrechnung
Read-only

Builds a German XRechnung 3.x electronic invoice (EN 16931, CII syntax) from invoice details and returns the XML as text. This is the format German public-sector buyers are legally required to receive, and that many private B2B buyers now ask for.

The EN 16931 business rules are checked before anything is built, and a rejected call comes back naming the rules that failed and the business term (BT-xx) each concerns. The ones worth getting right up front: tax category S requires a rate above 0 %, categories Z, E and AE require exactly 0 %, E and AE additionally require a stated exemption reason (BT-120), and both parties need an email address because XRechnung makes the electronic address (BT-34, BT-49) mandatory. For a public-sector buyer, put their Leitweg-ID in buyerReference (BT-10) — check_leitweg_id will verify it first.

What this does NOT do:

  • It does not validate against the KoSIT Prüftool. It applies our reading of EN 16931, which is not the same thing as the Schematron suite a receiving portal runs. Use validate_einvoice for a second look, and the official validator before a deadline.

  • It does not produce ZUGFeRD or Factur-X. There is no PDF and no embedded XML — this is a bare XML file. Use create_zugferd for the hybrid a private-sector B2B buyer usually wants.

  • It handles ONE tax rate and one tax category for the whole invoice. A document mixing 19 % and 7 % lines is not expressible here.

  • It does not send the invoice anywhere, and there is no Peppol.

Nothing is stored: no account, no invoice record, no retained personal data.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
invoiceYesThe invoice to turn into an XRechnung document.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / invoice / properties / deliveryDate
      Added value: +{
      +  "default": null,
      +  "format": "date",
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
  2. First observed

TDQS

A4.9/5.0
Behavior5/5

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

The description goes far beyond the spare annotations by disclosing non-obvious behavior: validation rules are enforced before building, rejected calls name failed BT-xx rules, only one tax rate is supported, no PDF is produced, nothing is transmitted, and nothing is stored. It also honestly notes that this is not equivalent to the official Schematron validation.

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?

Although long, the description is dense and well-structured: purpose first, then validation constraints, then a clear 'What this does NOT do' section, then a privacy/storage note. The bullet-like sections make the non-obvious limitations easy to scan, and no sentence feels wasted.

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 complex tool with nested parameters and no output schema, the description covers the essential operational context: output format, error behavior, legal context, key input constraints, exclusions, and side-effect guarantees. An agent has enough information to decide when to call this tool and what to expect back.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is high, so the baseline is 3, but the description adds meaningful guidance for key fields: taxCategoryCode/taxRate/taxExemptionReason relationships, mandatory email for both parties, and buyerReference as the Leitweg-ID for public-sector buyers. It does not individually explain every nested field, but the most legally sensitive parameters receive concrete semantic context.

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 opens with a specific verb and resource: it builds a German XRechnung 3.x electronic invoice in EN 16931/CII syntax and returns XML as text. It also distinguishes this tool from siblings by explicitly stating what it does not do, such as creating ZUGFeRD/Factur-X or validating against the KoSIT Prüftool.

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?

Usage guidance is explicit and actionable: it names check_leitweg_id for verifying Leitweg-IDs, validate_einvoice for a second validation look, and create_zugferd for private-sector hybrid invoices. It also gives context about when XRechnung is legally required, making the selection criteria clear.

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.

Resources