invoice_validate_totals
Audit DECLARED invoice numbers against the arithmetic the document itself asserts: amount == qty x unit_price per line, sum of line bases == subtotal, subtotal - discount + tax == total, declared tax vs line tax_rate under BOTH published rounding methods (aggregate / per-line; the match is NAMED). Exact Decimal cent-level, signed deltas, verdict OK or CONTRADICTED. Numbers are never corrected — a corrected claim destroys the evidence it was wrong. Computing an invoice is another contract (recipe/invoice). Blind spot published: an internally consistent wrong number stays invisible. Free.
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": {
"lines": "<lines>",
"declared": "<declared>"
},
"name": "invoice_validate_totals"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lines | Yes | ||
| currency | No | echoed label only, never computed with | |
| declared | Yes | ||
| tax_mode | No | exclusive (default) | inclusive |