Skip to main content
Glama

Finanz & SEO Tools API

Generate a valid XRechnung 3

eu_einvoice_generate
Read-only

Generate a valid XRechnung 3.0 (or plain EN 16931 / Factur-X EN16931 XML) e-invoice from a simple JSON payload, as UN/CEFACT CII or UBL 2.1 (invoice, credit note 381, partial/corrected invoices). Computes line totals, VAT breakdown per category/rate (S, Z, E incl. § 19 UStG Kleinunternehmer, AE reverse charge, K, G, O) and totals, then self-validates with the official CEN EN 16931 + KoSIT XRechnung schematron. Returns the XML plus validation report. If the result violates a business rule the call returns HTTP 422 with the rule errors and is NOT charged. Price: $0.03 USDC per call via x402.

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

Input Schema

NameRequiredDescriptionDefault
syntaxNoOutput syntax (default cii; ZUGFeRD/Factur-X use CII)
invoiceYesInvoice data
profileNoxrechnung (default, XRechnung 3.0 CIUS) or en16931 (plain EN 16931, e.g. for a Factur-X/ZUGFeRD EN16931 PDF)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Beyond the readOnly/openWorld annotations, the description discloses substantial behaviour: it computes line totals and VAT breakdowns per category, self-validates with the official CEN EN 16931 + KoSIT schematron, returns the XML plus a validation report, and returns HTTP 422 with rule errors and no charge on failure. The x402 pricing ($0.03 USDC per call) is also stated, which an agent needs to know before invoking a paid tool.

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 purpose is front-loaded in the first clause and the rest is a compact enumeration of computation, validation, failure semantics and price. It is dense but every sentence carries information; only the parenthetical format list is slightly heavy.

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?

With no output schema, the description explicitly names the return value (XML plus validation report), the failure mode (422 with rule errors, uncharged), and the pricing model, and the deeply nested schema is fully described. Together this is enough for an agent to call it correctly and interpret the result.

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 baseline is 3; the description still adds meaning by explaining that credit notes map to 381, corrections to partial/corrected types, and that category E/AE/K/G/O behaviour includes § 19 UStG Kleinunternehmer and reverse charge. These notes contextualise the enum values beyond the schema's bare listings.

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?

The description opens with a specific verb and resource: generate an XRechnung 3.0 (or EN 16931 / Factur-X) e-invoice from a JSON payload, emitted as CII or UBL 2.1. It names the supported document types (invoice, credit note 381, partial/corrected) and formats, which goes well beyond restating the title and lets an agent recognise a compute-from-structure tool rather than a file-scan tool.

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?

The 'from a simple JSON payload' phrasing implicitly separates it from scan-based siblings, and the profile/syntax parameters indicate the intended variants. However, no sibling is named and there is no explicit when-not-to-use guidance (e.g. use the scan or validate tool instead), so the agent must infer routing from context.

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