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), both parties need an email address because XRechnung makes the electronic address (BT-34, BT-49) mandatory, and an IBAN (BT-84) is required, because XRechnung makes payment instructions (BG-16) mandatory (BR-DE-1). 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.8/5.0
Behavior5/5

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

Annotations only declare readOnlyHint=true and openWorldHint=false; the description adds substantial context beyond that: EN 16931 business rules are checked before building, rejected calls name the failed rules and BT-xx terms, specific tax-category and exemption constraints are disclosed, and it explicitly states nothing is stored. This is consistent with readOnlyHint (builds and returns text, mutates no external state).

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

Conciseness4/5

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

Long, but front-loaded with the core purpose in the first sentence and then organized into a scannable 'What this does NOT do' list. Every sentence carries a constraint or routing instruction; it is appropriately sized for a tool with this much business-rule surface, though it is on the verbose side.

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?

Given a nested 1-parameter object schema with no output schema, the description supplies the preconditions, the failure behavior, scope limits (single tax rate/category, no PDF, no Peppol, no sending), and the sibling alternatives needed to call it correctly and interpret the result.

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 100%, so the baseline is 3, but the description adds genuine meaning not in the schema: seller/buyer email is mandatory (BT-34/BT-49), IBAN (BT-84) is required (BR-DE-1), buyerReference carries the Leitweg-ID (BT-10), and taxCategoryCode drives rate constraints. It does not cover every field (bic, bankName, notes, reference) but clearly elevates the critical ones.

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?

States a specific verb+resource ('Builds a German XRechnung 3.x electronic invoice'), names the standard (EN 16931, CII syntax), and states the return format (XML as text). It also implicitly distinguishes itself from create_zugferd by specifying a bare XML file, so an agent can tell it apart from siblings without opening schemas.

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?

Explicitly says when to use it (German public-sector buyers legally require it, many private B2B buyers ask for it) and when not to, naming the concrete alternatives: check_leitweg_id to verify the buyerReference first, validate_einvoice for a second look, create_zugferd for the hybrid format private B2B buyers want. Routing is 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.

Resources