Skip to main content
Glama

Agent Data Tools: Compliance and checks

Convert XRechnung, ZUGFeRD, Factur-X or UBL e-invoice to JSON

einvoice_to_json
Read-only

Convert an EU e-invoice to plain JSON: 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 number, dates, seller and buyer with VAT numbers and addresses, every line with quantity, price, VAT rate and net amount, the VAT breakdown, totals and bank account. Exact values from the file, no AI. Use to book incoming e-invoices into a sheet or ERP. 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_to_json"
  }
}

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

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.3/5.0
Behavior4/5

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

Beyond the annotations it discloses the billing model ($0.01/call via x402 USDC or card key, first 10 free, failed calls free) and that each call is charged so repeats are not free, which usefully explains the idempotentHint=false flag. It also states determinism ('Exact values from the file, no AI'). Missing: what happens on an unparseable or non-EN 16931 file.

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 action and accepted formats, then returns, then usage and pricing; every sentence carries information. It is on the dense side, with the payment-key details competing for attention, but no sentence is filler.

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?

For a two-parameter, zero-required conversion tool with no output schema, the description enumerates the returned fields (number, dates, parties, VAT IDs, lines, VAT breakdown, totals, bank account) and the cost model, so an agent can decide and invoke confidently. Only error/failure semantics for malformed input are left unstated.

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 adds the meaningful distinction between the input modes (XML as text, file in a POST body, or URL pointing at XML or a ZUGFeRD/Factur-X PDF), making it clear that the two parameters are alternative channels rather than both required.

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 ('Convert') and a precisely bounded resource: XRechnung, ZUGFeRD / Factur-X (including the embedding PDF), Peppol and other EN 16931 XML. The enumeration of accepted formats distinguishes it from the generic siblings like xml_to_json, which take arbitrary XML.

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 a concrete when-to-use ('Use to book incoming e-invoices into a sheet or ERP') and a clear scope limit ('Reads or computes only and changes nothing'), which implicitly steers validation/creation work to einvoice_validate or einvoice_create. It does not name any alternative tool explicitly, so it stops short of full 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