Skip to main content
Glama

EU e-invoicing and business checks (EN 16931, Peppol, VAT, sanctions)

Read a received e-invoice into JSON

parse_einvoice
Read-onlyIdempotent

Read an incoming EU e-invoice into one JSON shape: seller, buyer, dates, references, totals, VAT breakdown, payment/IBAN, lines and attachments. Accepts UBL 2.1 Invoice/CreditNote or UN/CEFACT CII XML (XRechnung, Peppol BIS 3, Factur-X XML) in xml, or a ZUGFeRD/Factur-X PDF as base64 in pdf_base64. Use when asked to read, extract or book a received e-invoice. Values are returned as written in the invoice; this does NOT validate it (use validate_einvoice for that).

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

Input Schema

NameRequiredDescriptionDefault
xmlNoInvoice XML as text (UBL or CII). Give either xml or pdf_base64.
pdf_base64NoBase64 of a Factur-X/ZUGFeRD PDF with embedded XML. Give either xml or pdf_base64.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / pdf_base64 / description
      Added value: +"Base64 of a Factur-X/ZUGFeRD PDF with embedded XML. Give either xml or pdf_base64."
    • addedInput schema / properties / xml / description
      Added value: +"Invoice XML as text (UBL or CII). Give either xml or pdf_base64."
  2. Added

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive and closed-world, so the safety profile is covered. The description still adds real value beyond them: that values are returned verbatim as written on the invoice rather than normalized, and that validation is deliberately not performed. It does not discuss failure modes for malformed or non-conforming XML, which is the remaining gap.

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 and output shape, then formats, then the usage/validation boundary — a sensible ordering. The returned-field enumeration is dense but earns its place because no output schema exists; only minor tightening is possible.

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-shape burden and largely discharges it by enumerating the JSON sections (seller, buyer, totals, VAT breakdown, lines, attachments). It does not describe nesting or how missing optional fields are represented, which a parsing agent might want, but nothing essential to calling it is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and both parameter descriptions already say 'Give either xml or pdf_base64' and list the accepted formats. The description's format list largely restates the schema, adding only the implicit mutual-exclusivity framing. Baseline 3 applies since the schema does the heavy lifting.

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?

Names a specific verb ('read/parse') and resource ('incoming EU e-invoice'), enumerates supported syntaxes (UBL 2.1 Invoice/CreditNote, UN/CEFACT CII, XRechnung, Peppol BIS 3, Factur-X, ZUGFeRD PDF) and the output fields produced. It explicitly separates itself from validate_einvoice, so an agent can choose 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 Guidelines5/5

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

States the trigger ('Use when asked to read, extract or book a received e-invoice') and the exclusion ('this does NOT validate it (use validate_einvoice for that)'), naming the alternative tool. Both when-to-use and when-not-to-use are covered explicitly.

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.