scan_gmail
Trigger a background Gmail scan to discover and process receipt emails from the last ~60 days (default). No server preview: starts on call and runs in the background; the user gets an email summary when done. Like clicking "Find Receipts in Gmail" in the UI. For whole PAST YEARS (e.g. 2023, or 2020-2022) use scan_gmail_years instead; to check a scan's progress use get_scan_status. With provider:outlook, returns an access-gated screen handoff only; no scan starts.
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": "scan_gmail"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| endDate | No | Optional: explicit end date (YYYY-MM-DD) | |
| provider | No | Default Gmail. | |
| startDate | No | Optional: explicit start date (YYYY-MM-DD) instead of lookbackDays | |
| accountEmail | No | Optional: which Gmail account to scan | |
| lookbackDays | No | How many days back to scan (default 60, max depends on subscription) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No | ||
| status | No | ||
| message | No | ||
| success | Yes | ||
| provider | No | ||
| _metadata | No | ||
| sessionId | No | ||
| orchestrated | No | ||
| submissionId | No | ||
| scanInitiated | No | ||
| scanInProgress | No | ||
| spreadsheetUrl | No | ||
| reviewExpensesUrl | No |