invoice-audit
Invoice arithmetic audit: line extensions, discounts, supplied tax, totals, with the drift in minor units — Recomputes up to 500 invoice lines in exact decimal arithmetic and compares them with the stated amounts, for an agent about to approve, pay or reconcile an invoice. Checks: quantity x unit price less discount equals the line amount; tax is taken as supplied (tax amounts are summed, never looked up) and, where a rate is given, tax equals rate x line amount under the declared rounding scope (per li
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>"
},
"name": "invoice-audit"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lines | Yes | ||
| stated | No | ||
| currency | No | ISO 4217 alphabetic code, upper case. | |
| exponent | No | ||
| rounding | No | Default half-up. half-up: ties away from zero. half-down: ties toward zero. half-even: ties to the even neighbour. up: away from zero. down: toward zero. ceiling: toward +infinity. floor: toward -infinity. | |
| taxRounding | No | line (default): each line's tax is rounded on its own. invoice: tax is rounded once per distinct rate on the sum of the line amounts, and compared with the supplied tax sum for that rate. | |
| toleranceMinor | No | Largest absolute drift in minor units still treated as a match. Default 0. |