add_income_from_file
Import income from attached JPEG/PNG/WebP/HEIC/HEIF screenshots/images or PDF (payment/wallet/payout/bank statement; max 10 MB). Step 1: file WITHOUT confirm uses Add Income's parser and Income-tab duplicate check. Returns previewId, exact count, currency totals, rows, duplicate flags/rejections; parses only, saves nothing. Attachment is not write consent. Show rows/duplicates. Step 2: confirm:true + previewId writes only user-approved selectedIndexes/keepBothIndexes/rowEdits/tag/bulkNote. Skip flagged duplicates unless explicitly approved in keepBothIndexes. Unknown/expired previews (15 minutes) never write. Success: show spreadsheetUrl + reviewIncomeUrl. Mixed income/expense or many edits: Add Income link from get_spreadsheet_url.
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": "add_income_from_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tag | No | Optional client/project tag. In step 1 it pre-fills the staged rows; in step 2 it applies to the confirmed selection. | |
| photo | No | Attached image or PDF supplied by ChatGPT for step 1. The server downloads and parses the attachment securely. | |
| confirm | No | Step 2 only: true writes the staged rows. Omit it (with previewId absent) to parse and preview without writing. | |
| bulkNote | No | Step 2 only: one note (max 120 chars) prepended to every confirmed row's Notes, same as the app's 'Add note to all entries'. | |
| mimeType | No | MIME type of the file (default: image/jpeg) | |
| rowEdits | No | Step 2 only: user-approved corrections, max 50 rows (date YYYY-MM-DD, source, amount, currency, category, paymentMethod, description, notes, reference, fees, taxCollected, tag). | |
| previewId | No | Step 2 only: the previewId returned by the step-1 call. | |
| photoBase64 | No | Legacy fallback for MCP clients that send complete image/PDF bytes as base64. ChatGPT should use photo. | |
| paymentMethod | No | Fallback payment rail for rows where the parser found none (Cash, Check, Bank transfer, Wallet app, Credit/Debit card, Payment processor, or Other). | |
| keepBothIndexes | No | Step 2 only: preview indexes of duplicate-flagged rows the user explicitly wants to keep anyway (the app's 'Keep Both'). | |
| selectedIndexes | No | Step 2 only: preview row indexes to write. Omit to write all staged rows. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| total | No | ||
| failed | No | ||
| deduped | No | ||
| entries | No | ||
| message | Yes | ||
| preview | No | ||
| success | Yes | ||
| written | No | ||
| warnings | No | ||
| confirmed | No | ||
| expiresAt | No | ||
| previewId | No | ||
| duplicates | No | ||
| entryCount | No | ||
| finalAnswer | No | ||
| unattempted | No | ||
| rejectedRows | No | ||
| duplicateCount | No | ||
| maxChatEntries | No | ||
| refundRowCount | No | ||
| spreadsheetUrl | No | ||
| reviewImportUrl | No | ||
| reviewIncomeUrl | No | ||
| tooLargeForChat | No | ||
| expiresInMinutes | No | ||
| idempotentReplay | No | ||
| responseGuidance | No | ||
| totalsByCurrency | No | ||
| projectionTruncated | No | ||
| confirmationContract | No |