list_emails
Retrieve emails from multiple accounts with pagination, filtering by unread status, folder, and account ID using live IMAP or local cache.
Instructions
List emails from inbox (supports multi-account). UIDs are scoped to each account—pass account_id for deterministic follow-up actions. Performs live IMAP fetch; failures usually indicate network or credential issues.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum number of emails to return (default: 50) | |
| offset | No | Number of emails to skip for pagination (default: 0) | |
| unread_only | No | Only return unread emails (default: true) | |
| folder | No | Email folder to fetch from (default: 'all' = no folder filter when using cache; falls back to INBOX for live IMAP) | all |
| account_id | No | Specific account to fetch from (optional) | |
| include_metadata | No | Include source metadata (cache/fetch) in results (default: true) | |
| use_cache | No | Use local sync cache (email_sync.db) instead of live IMAP when available |