Purchase invoices: Create from file
purchase_invoice_create_from_fileA file the person attached in THIS chat is NOT available to you as bytes — never try to base64-encode it yourself (the call hangs and nothing arrives). Instead call this tool with NO file argument: after confirmation it returns a one-time upload link (status 'upload_link', 'url'); give it to the person, they drop the PDF on the page and reading starts by itself. Or, if they sent the file to @OrgLinesBot, pass its 'capture_id' (intake_list_captures). Reads a SUPPLIER's invoice (a bill the company received and must pay — not one it issues) into a review draft: supplier, VAT ID, IBAN, number, dates, totals by VAT rate, lines, reverse charge, each with a confidence, plus the matching supplier organization and possible duplicates. Other ways to name the file: 'document_id' (a personal document already stored), or 'content_base64' + 'filename' ONLY when your client really holds the file's bytes (≤ 2 MB decoded; PDF, JPG, PNG or HEIC). Reading takes about a minute: then purchase_invoice_list / purchase_invoice_get. Nothing is written to the books here — the person checks and confirms the draft on its review page (review_url). Runs propose→confirm. CONFIRMATION: this tool is PROPOSED, never performed directly. You get status='confirmation_required' with an action_id and a plan_token, and the write happens only after confirm_action.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "purchase_invoice_create_from_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filename | No | ||
| capture_id | No | ||
| document_id | No | ||
| content_base64 | No | Only when you hold the real bytes; ≤ 2 MB decoded. Otherwise omit every file argument to get an upload link. |