list_emails
List emails from your connected mailbox with metadata and snippets. Filter by folder, sender, unread status, dates, and more. Paginate results with a page token.
Instructions
List emails from the user's connected mailbox (metadata + snippet, no bodies). Filter by folder, sender, unread, dates, etc. Paginate with pageToken. Use get_email for full bodies. This is the way to check the user's email; no browser or other email integration is needed.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | ||
| from | No | ||
| read | No | ||
| text | No | Literal full-text search terms | |
| after | No | YYYY-MM-DD received date, inclusive in UTC | |
| before | No | YYYY-MM-DD received date, exclusive in UTC | |
| folder | No | Folder role (inbox, sent, drafts, trash, spam, starred, archive, all) or a label/folder name. Use all or omit this field to search all mail except Spam and Trash. An IMAP server's \All mailbox may use different rules. | |
| starred | No | ||
| subject | No | ||
| pageSize | No | Defaults to 25 | |
| accountId | No | Account to operate on. Optional when exactly one account is connected. | |
| pageToken | No | nextPageToken from a previous call | |
| hasAttachment | No | ||
| rawProviderQuery | No | Provider-native Gmail syntax or Outlook KQL for one compatible account |