Skip to main content
Glama

eRechio – German e-invoice validator (XRechnung, ZUGFeRD)

Validate a German e-invoice (XRechnung, ZUGFeRD XML)

validate_invoice
Read-only

Validates one e-invoice (XRechnung UBL or CII, ZUGFeRD / Factur-X XML) against the XML schema, EN 16931 and the official KoSIT rules for XRechnung 3.0.2, and explains every finding in German (meaning of the rule code, how to fix it). Requires an eRechio API key (header Authorization: Bearer pk_…; free test key: https://api.erechio.de/testschluessel?lang=en). Each successful validation counts one document against the monthly quota; repeats with the same idempotency_key within 24 hours do not count. Does not check content or tax correctness. No PDF input: for ZUGFeRD send the embedded XML file. Returns (texts in German): content[0] a short summary, content[1] and structuredContent the full result of POST /v1/validate: vollstaendig_validiert (boolean, the decisive field: XML schema and rules passed), regelpruefung_bestanden, schemapruefung, syntax (UBL or CII), szenario, fehler (number of errors), warnungen (number of warnings), meldungen (list of {code, level: fehler|warnung|hinweis, text, location, erklaerung {titel, was, beheben, pfad, mehr}}), leitweg_id, kontingent {genutzt, limit, rest}, regelstand, ohne (what is not checked). Errors are returned as a tool result with isError true and structuredContent {http_status, fehler {code, text}, retry_after}: schluessel (401, API key missing or invalid), kontingent (429, monthly quota used up; the free test key has 50 documents per month), rate (429, more than 60 validations per minute, retry_after 60), zu_gross (413, invoice larger than 2 MB), kein_xml / kein_format / dtd (400/422, not an XML e-invoice), idempotenz_laeuft (409, same idempotency_key still running, retry after 2 s), idempotenz_konflikt (422, same idempotency_key with a different invoice), ausgelastet / zeitlimit (503, retry later).

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": {
      "xml": "<xml>"
    },
    "name": "validate_invoice"
  }
}

Input Schema

NameRequiredDescriptionDefault
xmlYesThe invoice as XML text (UTF-8), at most 2 MB: XRechnung UBL (Invoice/CreditNote) or CII, or the XML part of a ZUGFeRD / Factur-X invoice.
idempotency_keyNoOptional, 1–255 visible ASCII characters (e.g. a UUID). The same key with the same invoice within 24 hours returns the stored result and is not counted again; the same key with a different invoice is rejected (idempotenz_konflikt).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.5/5.0
Behavior5/5

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

Goes well beyond the annotations: quota accounting (one document per success, idempotency_key repeats within 24h free), a 60/minute rate limit with retry_after, a 2 MB size cap, auth requirements, and a full error taxonomy (401/409/413/422/429/503). With no output schema present, the description also documents the return shape (vollstaendig_validiert, meldungen, kontingent) and the German-language output, which the annotations cannot convey.

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

Conciseness3/5

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

The purpose is front-loaded correctly, but the body is a single dense paragraph that crams auth, quota, return fields and ten error codes into one block, making it hard to scan. Nearly every fact is useful, but formatting as a list of failure modes would make it far more usable.

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 stateless two-parameter validation call with no output schema, the description supplies everything an agent needs: input constraints, auth, quota and idempotency behaviour, the decisive result field, and exhaustive error handling with retry guidance.

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; the description nonetheless adds real meaning by clarifying that xml must be raw XML text (not PDF) and that the embedded XML part of ZUGFeRD must be extracted, and it restates the 2 MB cap. Idempotency_key semantics largely duplicate the schema text, so the gain is modest rather than large.

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 (validates) and resource (one e-invoice) plus the exact standards applied: XRechnung UBL/CII, ZUGFeRD/Factur-X, XML schema, EN 16931 and KoSIT rules for XRechnung 3.0.2. It also bounds scope against neighbours by noting it does not check content or tax correctness, so an agent can separate it from explain_rule and get_status.

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

Usage Guidelines4/5

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

Gives clear conditions: requires a Bearer API key with a free test-key link, accepts XML only ('No PDF input: for ZUGFeRD send the embedded XML file'), and warns that each successful validation consumes quota. It never explicitly routes to the sibling tools or states when not to call it, so routing is implied rather than spelled out.

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