extract_documents
Read receipts and invoices (JPG, PNG, WebP, HEIC, PDF, or a zip of them; one document per file or PDF; up to 25 documents per call, 10 MB each, PDFs up to 10 pages) into checked numbers. Give each file as file_id (from create_upload), url (public https) or data_base64 (up to 2 MB inline). MCP requests are capped near 4 MB by the SDK, so keep all inline base64 in one call under about 2 MB and use create_upload for more. Returns one entry per document with vendor, date, currency, line items, subtotal, tax, total and payment method, each field marked ok, check or missing, the checks that ran, a status of ready or needs_review with review_reasons, and duplicate_of for a repeated receipt. Money is a decimal string, never a float. Each document also carries printed: its dates and currency as printed, the paths of fields whose text could not be read (printed.unreadable), the paths of fields a second read changed after a failed check (printed.second_look), and the paths of amounts printed with a dotted thousands separator on a rupiah-style receipt ("31.000") that were read as the whole number (printed.thousands; the value is already converted and the field is marked check), and the paths of amounts the model returned as JSON numbers, whose printed digits are lost (printed.number_typed; the field is marked check). Also returns 24-hour download links for the exports you ask for: csv (default), line_items_csv, quickbooks_csv (one currency; set quickbooks_currency and quickbooks_date_format, MM/DD/YYYY or DD/MM/YYYY) and file_pack (a zip of the originals renamed by date, vendor and total, plus documents.csv). Each link lists the documents left out of that file: quickbooks_csv leaves out every document with status needs_review (and ones missing a date or total), with the reason; csv, line_items_csv and file_pack keep every document. Hints: country (ISO 3166-1 alpha-2) and currency (ISO 4217) help with unclear receipts, date_order (DMY or MDY) settles dates like 03/04/2026. Show documents with status needs_review and their review_reasons to the user before using their numbers. Free for now within a daily quota counted in documents (see start.md); price when payments are enabled: $0.01 per document. Use a client timeout of at least 240 s.
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": {
"files": "<files>"
},
"name": "extract_documents"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| files | Yes | Documents to read. Each item needs exactly one of file_id, url or data_base64 | |
| country | No | Country of the documents, ISO 3166-1 alpha-2 (for example DE) | |
| exports | No | Files to produce, each as a 24-hour download link. Default: csv; [] writes no file | |
| currency | No | Currency to expect when a document does not print one, ISO 4217 (for example EUR) | |
| date_order | No | How all-numeric dates such as 03/04/2026 are written: day first or month first | |
| quickbooks_currency | No | quickbooks_csv: the one currency the file holds (default: the most common one) | |
| quickbooks_date_format | No | quickbooks_csv: how dates are written (default MM/DD/YYYY) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ready | Yes | ||
| exports | Yes | ||
| skipped | Yes | ||
| documents | Yes | ||
| needs_review | Yes |