Skip to main content
Glama
EU Business Data MCP

EU Business Data MCP

Create a validated e-invoice (UBL 2.1)

create_einvoice
Read-onlyIdempotent

Generate a validated EU e-invoice (UBL 2.1) from simple JSON, with computed totals and VAT breakdown, while returning validation errors before submission.

Instructions

Create a validated EU e-invoice (UBL 2.1) from simple JSON. Use get_einvoice_route first if you do not know which format the buyer needs; use validate_einvoice for XML you already have. Input: invoice = {format: en16931|xrechnung|peppol-bis3, invoice_number, issue_date (YYYY-MM-DD), due_date?, currency (EUR), buyer_reference?, seller: {name, vat_id, street, city, postal_code, country, email, phone, contact_name}, buyer: {...}, lines: [{description, quantity, unit_price, unit?, vat_category (S|Z|E|AE|K|G|O), vat_rate}], payment: {iban, bic?, terms?}}. Output: {valid, xml, totals, errors}; totals and the VAT breakdown are computed.

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
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. First observedv0.1.0

TDQS

A4.7/5.0
Behavior4/5

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

Goes well beyond the annotations by disclosing that the result is validated, that totals and the VAT breakdown are computed rather than supplied, and that a {valid, xml, totals, errors} envelope comes back. It does not clarify that nothing is persisted server-side, which is what reconciles the 'create' verb with readOnlyHint=true — a small but real gap for an agent reasoning about side effects.

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-loads purpose, then routing, then a labeled Input block and a labeled Output block, so an agent can stop reading at whichever tier it needs. The input enumeration is long, but because the schema is circular it must be stated here; no sentence is merely decorative.

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?

No output schema exists, and the description compensates fully by stating the return envelope and noting that totals/VAT are derived. With a single deeply nested object parameter and no annotations covering validation semantics, this level of detail is exactly what the agent needs to construct a correct call.

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?

The schema itself is a thin wrapper that defers to the description ('see the tool description'), so the description carries the full semantic load: it enumerates the nested seller/buyer/line/payment structure, the format enum values, the VAT category codes, required vs optional fields, and the YYYY-MM-DD date format. This is meaning no structured field supplies, and without it the tool would be uncallable.

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, resource, standard and source ('Create a validated EU e-invoice (UBL 2.1) from simple JSON'), and explicitly contrasts itself with get_einvoice_route and validate_einvoice. An agent can distinguish it from every listed sibling 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?

Gives explicit conditional routing: use get_einvoice_route first when the buyer's format is unknown, and use validate_einvoice for XML already in hand. Both alternatives and the conditions selecting them are named, leaving nothing to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.