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.

Needs a personal access token (Authorization: Bearer inkv_...): without one, InkVoice refuses the call.

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

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>"
    },
    "name": "create_xrechnung"
  }
}

Input 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?

Goes well beyond the annotations: pre-flight EN 16931 rule checking with failure output naming BT-xx terms, the concrete tax-category/rate/exemption constraints, mandatory email and IBAN (BG-16/BR-DE-1), bearer-token auth requirement, and a no-storage guarantee that is consistent with readOnlyHint=true. It also bounds the tool's authority ("our reading" of EN 16931, not the Schematron suite a portal runs), which is exactly the kind of caveat annotations cannot express.

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?

Front-loaded with what it produces, then a clearly labelled "What this does NOT do" block — well structured and skimmable. The validation-rule paragraph is dense but each clause maps to a distinct failure mode, so the length is mostly earned rather than padding.

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?

A single nested invoice object with many optional sub-fields, no output schema, and no annotations covering safety or auth — yet the description covers the return value (XML text), auth, persistence, scope limits, and the cross-field constraints. Nothing an agent needs in order to call it correctly is missing.

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

Parameters5/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 real meaning the schema does not carry: buyerReference is the buyer's Leitweg-ID (BT-10), international BT/BR identifiers for email, IBAN, and exemption reason, plus the taxCategoryCode/taxRate coupling (S requires >0%, Z/E/AE require exactly 0%). These are cross-field constraints an agent cannot read off 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?

States a specific verb and artifact: builds a German XRechnung 3.x invoice (EN 16931, CII syntax) from invoice details and returns XML as text. It also positions the format relative to alternatives (public-sector requirement vs. private B2B), so an agent can distinguish it from create_zugferd without opening either 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?

Explicit when-to-use (German public-sector buyers, Leitweg-ID in buyerReference) and explicit when-not-to-use: no KoSIT validation (use validate_einvoice), no ZUGFeRD/Factur-X (use create_zugferd), no mixed tax rates, no sending/Peppol. It names the sibling tools and the condition that selects each, leaving nothing to inference.

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