list_emails
Retrieve and filter email messages from connected accounts with metadata, previews, and pagination. Search by folder, sender, dates, unread status, or full-text to find specific messages quickly.
Instructions
List emails from the user's connected mailbox with metadata and optional previews. 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 | ||
| includeSnippet | No | Request or suppress message previews | |
| rawProviderQuery | No | Provider-native Gmail syntax or Outlook KQL for one compatible account | |
| includeSearchContext | No | Include a match-centered body excerpt; requires a portable text query |