Draft bill from a supplier document
bill_from_documentExtract supplier invoice fields from OCR text, validate GST in whole cents, and prepare a draft ACCPAY supplier bill, blocking mismatches or duplicates.
Instructions
Read the text of a supplier invoice (OCR style), extract the fields, check the GST maths in whole cents and propose a DRAFT supplier bill (ACCPAY). Deterministic parser by default; mode=claude is optional and sends the text to the Anthropic API. Dry run by default. If the GST does not add up, the supplier is unknown or the bill number already exists, it is blocked even with confirm=true. Created as DRAFT only, never approved.
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": {
"text": "<text>"
},
"name": "bill_from_document"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | deterministic | |
| text | Yes | ||
| confirm | No | ||
| contact_id | No | Xero ContactID of the supplier, if the name on the document does not match |