Add receipt
purch_add_receiptRecord a receipt you read: vendor, date, total, and the file's name and hash. Candidates to match come back; matching is a separate act. The file stays with the person (P-9); this keeps what it says. HAND OVER THE LINES TOO when the receipt prints them, tax as its own line: they must add up to the total, and that check is what catches a misread digit in a photo, the same way a statement's printed balances catch a misread row. If the lines do not add up, the receipt is refused and you look again; never adjust a number to make it fit. Then look at the candidates and match with purch_match_receipt, with a reason. An unmatched receipt is a visible state, not an error. Effects: receipt recorded, unmatched.
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": {
"name": "<name>",
"hash": "<hash>",
"date": "<date>",
"total": "<total>",
"currency": "<currency>"
},
"name": "purch_add_receipt"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| date | Yes | Receipt date. ISO date, YYYY-MM-DD. | |
| hash | Yes | Content hash, or a stable id you can repeat. | |
| name | Yes | File name as given. | |
| note | No | ||
| lines | No | The lines on the receipt, when it prints them. They must add up to the total, tax included as its own line: that is how a misread digit is caught. | |
| total | Yes | The total on the receipt, positive. In cents (integer minor units) — 1250 means $12.50. | |
| vendor | No | The shop as printed on the receipt. | |
| currency | Yes | ISO 4217 code. | |
| return_by | No | The last day to return it, when the receipt prints one. ISO date, YYYY-MM-DD. | |
| warranty_until | No | When the warranty ends, when the receipt or the box states it. ISO date, YYYY-MM-DD. |