Validate an e-invoice (EN 16931)
einvoice_check2 calls. Runs the official CEN EN 16931 business rules (validation artefacts, unmodified) on a UBL 2.1 Invoice/CreditNote or UN/CEFACT CII (also the XML inside Factur-X/ZUGFeRD). Returns VALID/INVALID, each failed rule id with where it fails and how to fix it. Use it whenever asked if an e-invoice is valid or why it was rejected - reading XML by eye misses arithmetic and code-list rules. XML is checked in memory, not stored.
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": {
"xml": "<xml>"
},
"name": "einvoice_check"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| xml | Yes | The complete invoice XML document as text. | |
| ruleset | No | Optional; auto detects UBL vs CII. | auto |