Skip to main content
Glama

InkVoice — XRechnung & E-Invoicing

validate_einvoice

Reads an existing electronic invoice and reports what is wrong with it. Accepts XRechnung and ZUGFeRD XML in either EN 16931 syntax — CII (used by XRechnung and ZUGFeRD) and UBL — and reports the syntax and profile it found along with the invoice's key fields, so it also answers "what is this file?".

It checks the rules behind most real rejections: BT-10 buyer reference present, and its Leitweg-ID check digit when it looks like one; BT-34 and BT-49 electronic addresses present; tax category S not used at 0 %; BT-120 exemption reason present for categories E and AE; line amounts summing to BT-106; net plus tax equalling the BT-112 gross; BT-115 amount due matching gross less prepaid; and the due date not falling before the issue date.

What this does NOT do:

  • It is NOT the KoSIT Prüftool and is not a substitute for it. It covers the rules that account for most rejections, not the full EN 16931 Schematron suite. A file that passes here can still be rejected by a Rechnungseingangsportal.

  • It does not check the XSD schema, so a structurally invalid document may parse here.

  • It reads XML only. A ZUGFeRD PDF must have its embedded XML extracted first — pass the XML, not the PDF.

Nothing is stored: the document is parsed in memory and discarded.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
xmlYesThe full XML text of the invoice. For ZUGFeRD, the XML extracted from the PDF, not the PDF itself.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

No annotations exist, so the description carries full disclosure burden. It clearly states the validation rules it covers, its limitations (no XSD, not a full Schematron suite), the input constraint (XML only, extracted from ZUGFeRD PDFs), and that nothing is stored because the document is parsed in memory.

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?

Though longer than average, the description is organized into purpose, rule coverage, and explicit non-goals with no filler. The level of detail is justified because the tool's scope, limitations, and output are non-obvious.

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?

With no output schema, the description compensates by naming what the tool reports (syntax, profile, key fields, rule failures) and stating all validity constraints. It does not specify the exact output structure or format, but it supplies enough for an agent to select and call the tool correctly.

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?

The schema already fully documents the `xml` parameter. The description adds practical meaning by stating which EN 16931 syntaxes are accepted and reinforcing that the PDF itself must not be passed, only the extracted XML.

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 action and resource: it reads an existing electronic invoice and reports what is wrong with it, identifying the syntax, profile, and key fields. It also names supported formats (XRechnung/ZUGFeRD, CII/UBL), which clearly differentiates it from the create/calculate/check siblings.

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?

The 'What this does NOT do' section explicitly warns that it is not the KoSIT Prüftool, does not cover the full EN 16931 Schematron suite, does not check XSD, and cannot read PDFs. This tells an agent when not to rely on it and directs them to the proper alternative for full validation.

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