Validate an e-invoice (EN 16931, XRechnung, Peppol BIS)
validate_einvoiceCheck EU e-invoice XML (UBL/CII) against EN 16931 and XRechnung 3.0 rules to catch errors before sending or after receiving.
Instructions
Validate an EU e-invoice XML you already have (UBL 2.1 Invoice/CreditNote or UN/CEFACT CII, e.g. XRechnung, Factur-X/ZUGFeRD XML) against the official CEN EN 16931 rules and, for XRechnung, the KoSIT XRechnung 3.0 rules. Use when: checking an invoice before sending it or after receiving it. To build a new invoice from data use create_einvoice. Input: xml as text; rules = auto | en16931 | xrechnung. Peppol-specific rules are not checked yet; for PDFs use the REST endpoint POST /einvoice/validate. Output: {valid, syntax, errors: [{rule_id (e.g. BR-CO-10), severity, message, location (XPath), fix}], warnings, checked}.
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": "validate_einvoice"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| xml | Yes | The e-invoice XML as text: UBL 2.1 Invoice/CreditNote or UN/CEFACT CII (XRechnung, Factur-X/ZUGFeRD XML). | |
| rules | No | Rule set: 'auto' (detect from the invoice, default), 'en16931' or 'xrechnung'. | auto |