Skip to main content
Glama

Agent Data Tools: Compliance and checks

Create XRechnung, ZUGFeRD or Factur-X e-invoice from JSON

einvoice_create
Read-only

Create an EU e-invoice from plain JSON: seller, buyer, lines with quantity, price and VAT rate, bank account. Returns XRechnung 3.0 XML (CII or UBL), a ZUGFeRD / Factur-X PDF with the XML inside, its XML alone, or EN 16931 UBL. Totals and VAT breakdown are computed and checked against the business rules first; data that breaks a rule is refused uncharged with the rule numbers. Use to issue German B2B e-invoices from a shop, ERP or workflow. 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

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "invoice": "<invoice>"
    },
    "name": "einvoice_create"
  }
}

Input Schema

NameRequiredDescriptionDefault
formatNoxrechnung (default: XRechnung 3.0, CII syntax), xrechnung-ubl, zugferd-pdf (a readable A4 invoice as PDF/A-3 with the factur-x.xml embedded, returned as pdfBase64), zugferd (that factur-x.xml alone, EN 16931 profile) or ubl (EN 16931 UBL)
invoiceYesThe invoice as JSON: number, issueDate, dueDate, buyerReference (Leitweg-ID or order reference), seller and buyer {name, vatId, street, postCode, city, country, contactName, phone, email}, lines [{name, quantity, unit, unitPrice, vatRate}], payment {iban, bic, terms}. In a POST body send it as a JSON object. The flat fields /document/extract returns (invoice_number, seller_name, line_items…) are read too
languageNoLanguage of the labels on a zugferd-pdf page: de or en (default: de when the seller is in Germany or Austria, otherwise en)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.1/5.0
Behavior5/5

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

Beyond the annotations, it discloses pricing ($0.01/call via x402 USDC or card key), the free tier (first 10 free, failed calls free), and that totals/VAT are computed and rule-checked before any charge, with rule numbers returned on refusal. It also confirms no side effects ("reads or computes only and changes nothing"), consistent with readOnlyHint=true and destructiveHint=false.

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?

The output formats and the JSON-input contract are front-loaded, and the pricing/validation sentences carry real decision-relevant information. The final pricing sentence is dense and slightly repetitive ("failed calls free" vs. "refused uncharged") but nothing is wasted.

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 3-parameter creation tool with no output schema, the description covers input shape, all output variants (including pdfBase64), validation failure behavior, and cost model, while annotations already carry the safety profile. An agent has everything needed to call it correctly and predict the response.

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 the schema already documents format enums, the invoice JSON fields, and the language default, so the description adds little new parameter meaning. Its mention of seller/buyer/lines/bank account and the /document/extract flat fields largely restates what the schema says; baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb and resource ("Create an EU e-invoice from plain JSON") and enumerates the exact artifacts produced (XRechnung 3.0 CII/UBL, ZUGFeRD/Factur-X PDF, embedded XML, EN 16931 UBL). The 'from plain JSON' framing implicitly separates it from the reverse-direction sibling einvoice_to_json, but no sibling is named explicitly.

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?

"Use to issue German B2B e-invoices from a shop, ERP or workflow" gives a clear usage context, and the validation-before-charge behavior tells the agent what happens on bad input. There is no explicit when-not guidance or named alternative such as einvoice_validate or invoice_check for pre-checking data.

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