Read an invoice and check that it adds up
extract_invoiceReads invoices, bills and receipts from PDF into structured JSON — vendor, customer, dates, PO, line items, discount, tax, shipping, total, balance due — and checks the arithmetic: quantity × unit price, lines to subtotal, tax rate, total and balance due. The response says exactly which figures don't add up. Returns vendor, customer, invoice number, dates, PO, line items, subtotal, discount, taxes, shipping, total, amount paid and balance due, plus checks (passed true/false, or null when the figures aren't printed). $0.04 per page (up to 25 pages) in USDC per successful read via x402, quoted before you pay; failed reads are free. First 3 reads a day are free (documents up to 10 pages, no payment needed); after that, the usual price.
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": {
"document": "<document>"
},
"name": "extract_invoice"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| document | Yes | The PDF, base64-encoded (a data: URL prefix is fine). Max about 3 MB and 25 pages. | |
| fileName | No | Original file name, if known. |