Skip to main content
Glama

Create an e-invoice from JSON

generate_invoice
Read-only

Create a valid EN 16931 e-invoice (UBL or CII XML) from JSON.

Input: invoice is a JSON object keyed on EN 16931 Business Terms, the same schema as POST /v1/generate, at most 4 MB. Main fields: syntax ("ubl" default, or "cii"), flavor ("en16931" default, or "xrechnung", which requires buyer_reference, the Leitweg-ID BT-10, and payment_iban), invoice_number, issue_date (YYYY-MM-DD), currency, seller, buyer, lines, tax_breakdown, totals. invowerk writes your amounts as given. It does not compute or correct them.

Returns xml, syntax, flavor and self_validation. invowerk checks the XML before answering and never returns an invalid document. Invalid input, or XML that fails the check, returns an error, as does a busy (engine_busy) or overrunning (engine_timeout) generate.

Credits: 5 per call.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
invoiceYesThe invoice as a JSON object keyed on EN 16931 Business Terms, the schema of POST /v1/generate and of parse_invoice's `model`: syntax, flavor, invoice_number, issue_date, currency, seller, buyer, lines, tax_breakdown, totals.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

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?

Goes well past the annotations: discloses the 4 MB input cap, default behavior for `syntax` and `flavor`, the extra requirements for xrechnung (`buyer_reference`/Leitweg-ID BT-10 and `payment_iban`), the critical semantic that amounts are written as given and never computed or corrected, the precondition that the XML is self-checked and invalid documents are never returned, the failure modes (engine_busy, engine_timeout, invalid input), and the cost (5 credits per call). This is exactly the behavioral context an agent needs before invoking.

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 one-line purpose, then input, then output, then errors, then cost — a sensible order for an agent. It is on the long side and the field list duplicates what the schema already carries, but nearly every sentence (validation guarantee, amounts-as-given, xrechnung prerequisites) carries non-redundant information.

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 single-parameter tool with a nested object and an output schema, the description covers everything an agent needs: the input contract, the size limit, flavor-dependent requirements, the correctness caveat, the validation guarantee, and the error/credit model. Return values (`xml`, `syntax`, `flavor`, `self_validation`) are named, and the output schema handles their details.

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% and the nested `invoice` object is already documented, so the baseline is 3, but the description adds real meaning: default values, the enumeration for `flavor`, the conditional dependency between `xrechnung` and two other fields, and the size limit. It also enumerates the main sub-fields (`seller`, `buyer`, `lines`, `tax_breakdown`, `totals`), which largely restates the schema but anchors the shape of the nested object.

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 and resource ("Create a valid EN 16931 e-invoice (UBL or CII XML) from JSON") and pins down the exact output artifact format. The five siblings (convert_invoice, parse_invoice, validate_invoice, render_invoice, explain_errors) are distinguishable from this one because the description fixes both input (JSON keyed on EN 16931 BT) and output (XML).

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 input contract (JSON keyed on EN 16931 Business Terms, same schema as POST /v1/generate, cross-referenced to parse_invoice's `model`), so an agent can infer that this is the JSON-to-XML direction. However there is no explicit when-to-use/when-not guidance and no direct routing to convert_invoice (XML in) or validate_invoice (check only), which are the natural alternatives. A reader must infer the boundaries.

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.