add_income_from_csv
Import income from a CSV/TSV/text export (Stripe, PayPal, Square, Cash App, Venmo, OnlyFans, Patreon, Clips4Sale, Ko-fi, Gumroad, Etsy, Uber/Lyft/DoorDash driver exports, bank statements, and similar; max 500 KB). Same two-step contract as add_income_from_file: STEP 1 call with csvContent and WITHOUT confirm parses the file with the same platform-agnostic importer as the app's Add Income screen (platform detection, fee handling, refunds, source aliases, ISO dates) and returns a duplicate-checked preview with a previewId. NOTHING is saved in step 1. Show the user the parsed rows and duplicates, then STEP 2 call again with confirm: true and the previewId to write exactly those rows, optionally with user-approved selectedIndexes, keepBothIndexes, rowEdits, tag, or bulkNote. Flagged duplicates are skipped unless the user explicitly keeps them. The preview expires after 15 minutes and an expired or unknown previewId never writes. After a successful confirm, show the returned spreadsheetUrl and reviewIncomeUrl.
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. | |
| confirm | No | Step 2 only: true writes the staged rows. Omit it (with previewId absent) to parse and preview without writing. | |
| csvText | No | Legacy fallback for MCP clients that send raw CSV/TSV/text content inline. ChatGPT should use csvContent. | |
| 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'. | |
| rowEdits | No | Step 2 only: user-approved corrections, at most 50 rows. Fields: date (ISO 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. | |
| csvContent | No | Attached CSV/TSV/text file supplied by ChatGPT for step 1. The server downloads and decodes the attachment securely. | |
| 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. |