Create a validated e-invoice (UBL 2.1)
create_einvoiceGenerate 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
| Name | Required | Description | Default |
|---|---|---|---|
| invoice | Yes | Invoice as simple JSON: format, invoice_number, issue_date, currency, seller, buyer, lines, payment (see the tool description). |