Skip to main content
Glama

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

Create a validated e-invoice (UBL 2.1)

create_einvoice
Read-onlyIdempotent

Create a validated EU e-invoice (UBL 2.1) from simple JSON. invoice = {format: en16931|xrechnung|peppol-bis3, invoice_number, issue_date (YYYY-MM-DD), due_date?, tax_point_date?, delivery_date?, currency (EUR), buyer_reference?, seller: {name, vat_id, street, city, postal_code, country, email, phone, contact_name, company_id?, company_id_scheme?, legal_form?}, buyer: {...}, lines: [{description, quantity, unit_price, unit?, vat_category (S|Z|E|AE|K|G|O), vat_rate}], payment: {iban, bic?, terms?}}. Totals and VAT breakdown are computed; returns {valid, xml, totals, errors, fixes}. autofix=true applies the safe fixes (date formats, codes, VAT ID format, misnamed fields) first and returns the corrected input in autofix.invoice.

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

Input Schema

NameRequiredDescriptionDefault
autofixNoIf true, first apply safe input fixes (date formats, codes, VAT ID format, misnamed fields); the corrected input is in autofix.invoice.
invoiceYesInvoice as simple JSON: format, invoice_number, issue_date, currency, seller, buyer, lines, payment (see the tool description).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / autofix / description
      Added value: +"If true, first apply safe input fixes (date formats, codes, VAT ID format, misnamed fields); the corrected input is in autofix.invoice."
    • addedInput schema / properties / invoice / description
      Added value: +"Invoice as simple JSON: format, invoice_number, issue_date, currency, seller, buyer, lines, payment (see the tool description)."
  2. Changed1 schema field changed
    • addedInput schema / properties / autofix
      Added value: +{
      +  "default": false,
      +  "title": "Autofix",
      +  "type": "boolean"
      +}
  3. First observed

TDQS

A4.1/5.0
Behavior4/5

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

The annotations already communicate read-only, idempotent, non-destructive, and closed-world behavior. The description adds useful behavioral context beyond that: totals and VAT breakdown are computed, the return object includes valid/xml/totals/errors/fixes, and autofix applies only safe corrections and returns the corrected input.

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 description is front-loaded with the core purpose and then gives dense but necessary nested-field details. It is appropriately sized for a complex nested input, but the single-paragraph structure makes the field specification harder to scan than it could be.

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 complex tool with nested invoice data and no output schema, the description is complete enough to call correctly. It documents the input structure in detail, explains computed totals and VAT breakdown, and specifies the return shape and autofix results.

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

Parameters5/5

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

Although the top-level schema has 100% description coverage, the invoice object is only referred to as 'simple JSON' in the schema. The description supplies the substantive semantics: required fields, supported formats, line-item structure, VAT category enum values, payment fields, and autofix behavior.

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 states a specific verb and resource: create a validated EU e-invoice in UBL 2.1 from simple JSON. That clearly separates generation of an XML invoice from more general validation or parsing, though it does not explicitly name sibling tools such as validate_einvoice or parse_einvoice.

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?

Usage is implied by the detailed input shape and by the autofix explanation, but there is no explicit when-to-use or when-not-to-use guidance against alternatives like validate_einvoice or send_einvoice_sandbox. The agent can infer the tool is for generating a validated XML invoice, but routing guidance is limited.

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.