validate_invoice
Validates invoice XML against ZATCA business rules, checking required fields, VAT numbers, mathematical accuracy, and UBL 2.1 structural integrity.
Instructions
Validate an invoice XML against ZATCA business rules.
Runs comprehensive checks including: required fields, VAT number format, mathematical accuracy of line totals and VAT calculations, and structural integrity of the UBL 2.1 XML.
Args: invoice_xml: Complete UBL 2.1 XML invoice string to validate
Returns: JSON with is_valid (boolean), errors (list of issues), warnings (list), and checks_run (number of rules 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": {
"invoice_xml": "<invoice_xml>"
},
"name": "validate_invoice"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| invoice_xml | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |