scan_gmail_years
Scan one or more COMPLETED PRIOR years of the user's Gmail for receipts (e.g. years:[2023] or years:[2020,2021,2022]). Long-running background job: the first eligible year starts immediately and the rest queue, running one at a time (each full year typically takes a couple of hours; the user can close the app). ALWAYS call first WITHOUT confirmStart to preview which years are eligible, then ask the user to confirm, then call again with confirmStart:true. For receipts from the last ~60 days use scan_gmail instead. To check how a scan is going, use get_scan_status. The current in-progress year cannot be year-scanned.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| years | Yes | Completed prior years to scan, e.g. [2020, 2021]. Max 10. | |
| accountEmail | No | Optional: which connected Gmail inbox to scan (multi-inbox users). Defaults to the primary. | |
| confirmStart | No | Omit or false = preview only (no scan starts). Must be exactly true to start scanning. |