Skip to main content
Glama

Invoiceer e-invoicing tools

Validate an e-invoice

validate_einvoice
Read-only

Validate an e-invoice (XRechnung UBL/CII, ZUGFeRD / Factur-X PDF, Peppol BIS Billing 3.0, EN 16931) with the official KoSIT validator. Returns valid/invalid, the detected format, every error and warning with its rule code, and the exact corrected value for common calculation errors. Pass the XML as text in xml, or a PDF/XML file base64-encoded in file_base64. Max 5 MB.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "validate_einvoice"
  }
}

Input Schema

NameRequiredDescriptionDefault
xmlNoThe invoice XML (UBL or CII) as text.
franceNoAlso check the French rules (BR-FR, XP Z12-012), reported as a separate `france` block. Automatic when the seller country is FR.
file_base64NoAlternative: the file (ZUGFeRD/Factur-X PDF or XML), base64-encoded.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / france
      Added value: +{
      +  "description": "Also check the French rules (BR-FR, XP Z12-012), reported as a separate `france` block. Automatic when the seller country is FR.",
      +  "type": "boolean"
      +}
  2. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so the safety profile is covered. The description adds genuine value beyond that: it names the external validator used, lists what the response contains (valid/invalid, detected format, per-rule errors/warnings, corrected values), and states the 5 MB size limit.

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?

Three dense sentences: purpose and supported formats first, return payload second, input channel and size limit last. Every sentence carries information an agent needs; nothing is padding.

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 carries the return-value burden and does so well by listing the result fields. It is only slightly short on operational detail — e.g., whether validation is remote/network-dependent or how long a 5 MB PDF check takes — but nothing essential for calling it correctly is missing.

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 goes further by framing `xml` and `file_base64` as mutually exclusive alternatives and adding the 5 MB cap, which the schema does not state; the `france` behavior is already fully described in 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 (validate) and resource (e-invoice) and enumerates the exact supported standards (XRechnung UBL/CII, ZUGFeRD/Factur-X, Peppol BIS 3.0, EN 16931) plus the validator engine (KoSIT). No sibling verb is remotely similar (create_einvoice, explain_rule), so the agent can route correctly without opening a schema.

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

Usage Guidelines3/5

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

It does explain the two input channels — XML as text in `xml`, or a PDF/XML base64-encoded in `file_base64` — which is real selection guidance. But it never says when to prefer this over siblings like explain_rule (for interpreting returned rule codes) or check_leitweg_id, nor any when-not conditions or prerequisites.

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