Skip to main content
Glama

Check an e-invoice

validate_invoice
Read-only

Check an e-invoice against EN 16931 and German rules.

Input: invoice_base64 is the base64 of an XML invoice (UBL or CII) or a ZUGFeRD / Factur-X PDF, at most 4 MB decoded; or pass the file as a download link in file. explain=true adds an explanation to findings whose rule has one, in lang ("de" or "en").

valid is the result. For XRechnung the KoSIT validator decides. If it is unreachable, invowerk's own check with the same rules decides, verdict_source is "local" and official_degraded is true. disagreement is true when both ran and differ. findings lists each problem with rule_id, severity and message; pass the codes to explain_errors (free). pdfa_verdict is the PDF/A check of a PDF. hints never change valid. Unreadable input returns a finding, not an error. It fails with an error when the check is busy (engine_busy), ran longer than 20 s (engine_timeout) or the XML has more than 100,000 elements (document_too_complex).

Credits: 1 per call.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileNoThe file as a download link, instead of `invoice_base64`. In ChatGPT, pass the user's uploaded file here. Other clients can set `download_url` to a public https URL.
langNoLanguage of the explanations: "de" (default) or "en".de
explainNotrue adds an explanation to each finding whose rule has one.
invoice_base64NoThe invoice file, base64-encoded. At most 4 MB decoded.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / lang / enum
      Added value: +[
      +  "de",
      +  "en"
      +]
  2. First observed

TDQS

A4.6/5.0
Behavior5/5

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

With annotations covering only readOnlyHint/openWorldHint, the description carries real weight: it discloses the KoSIT-vs-local fallback, `verdict_source`, `official_degraded`, `disagreement`, the specific error codes (engine_busy, engine_timeout, document_too_complex), the 4 MB/100k-element limits, credit cost, and that unreadable input yields a finding rather than an error.

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-loads the purpose in the first sentence, then groups input details, result semantics, and failure modes. Dense and largely waste-free, though the run of result-field explanations (:verdict_source, disagreement, pdfa_verdict, hints) is close to restating the output schema.

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 validation tool with degraded-mode behavior and rich output, the description covers inputs, the authoritative-vs-local resolution logic, error conditions, and cost. An agent has everything needed to call it and interpret the outcome.

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 format semantics the schema omits: that invoice_base64 may be UBL or CII XML or a ZUGFeRD/Factur-X PDF, and the 4 MB limit. It also clarifies the effect of explain/lang beyond the schema's one-liners.

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 resource ('Check an e-invoice') and pins the scope precisely: EN 16931 plus German rules, accepting UBL/CII XML or ZUGFeRD/Factur-X PDF. The follow-up routing to explain_errors makes it distinguishable from the sibling parse/convert/render tools.

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?

It explains the two mutually exclusive input paths (invoice_base64 vs. `file` download link) and points the agent at explain_errors for codes. What's missing is an explicit statement of when this tool is preferable to siblings such as parse_invoice or convert_invoice.

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.