Skip to main content
Glama

Agent Data Tools: Compliance and checks

E-invoice validation: XRechnung, ZUGFeRD, Factur-X or UBL e-invoice

einvoice_validate
Read-only

Validate an EU e-invoice: send XRechnung, ZUGFeRD / Factur-X (XML or the PDF that embeds it), Peppol or other EN 16931 XML as text, as a file in a POST body or by URL. Returns valid or not and every broken business rule with its number (BR-CO-15, BR-DE-15…), the field, a plain message and the fix. Checks a subset of the EN 16931 and XRechnung 3.0 rules: sums, VAT, mandatory fields. Use before sending an e-invoice or when one is rejected. Price $0.01/call via x402 USDC or a card key (/credits), first 10 free; failed calls free. Reads or computes only and changes nothing; each call is charged, so repeats are not free.

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": "einvoice_validate"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlNoAbsolute public http(s) URL of the e-invoice: an XML file or a ZUGFeRD / Factur-X PDF (or send `xml`, or the file in a POST body)
xmlNoThe e-invoice XML as text (CII or UBL), up to 5 MB in a POST body
profileNoauto (default: the German XRechnung rules run when the file names XRechnung), xrechnung or en16931

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, destructiveHint=false and openWorldHint, but the description adds genuinely new behavior: the rule scope is explicitly a subset of EN 16931 and XRechnung 3.0 (sums, VAT, mandatory fields), the result shape is described, and pricing/billing is disclosed ($0.01/call via x402 USDC or card key, 10 free, failed calls free, repeats charged) — which also explains idempotentHint=false. The only missing piece is any rate/size ceiling beyond the schema's 5 MB note.

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 the verb, formats and return shape, then scope caveat, then usage trigger, then billing. Dense but nearly every clause carries information; the billing/pricing sentence is the longest and could be tightened, though it explains the idempotency annotation.

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?

There is no output schema, so the description must describe results — and it does, down to the per-rule error payload (rule number, field, message, fix). Combined with the disclosed rule-subset limitation, billing model and read-only guarantee, an agent has everything needed to call it correctly and interpret the answer.

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 schema already documents url, xml and profile. The description still adds value by framing the three delivery modes in parallel (text, file in a POST body, URL) and reiterating that ZUGFeRD PDFs are accepted as URLs, which helps an agent choose among mutually substitutable inputs. It adds little about the profile enum beyond what the schema states.

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 (EU e-invoice) plus the exact format families covered: XRechnung, ZUGFeRD/Factur-X (XML or embedding PDF), Peppol/EN 16931 XML. This is enough to distinguish it from siblings like einvoice_to_json (conversion) and einvoice_create (generation) 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 Guidelines4/5

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

Gives clear triggering contexts: "Use before sending an e-invoice or when one is rejected." It does not name a specific alternative tool or state when NOT to use it (e.g. versus invoice_check or pack_einvoice_check), so it falls short of explicit routing guidance.

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