search_emails
Search emails in a folder by text, sender, recipient, subject, date range, or unread state. Returns newest-first summaries with pagination.
Instructions
Search messages in a folder by text, sender, recipient, subject, date range, or unread state. Returns envelope summaries newest first, with pagination.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | match recipient address or name | |
| from | No | match sender address or name | |
| limit | No | max messages to return (default 20, max 100) | |
| query | No | free-text search over message headers and body | |
| since | No | received on or after this date, YYYY-MM-DD | |
| before | No | received strictly before this date, YYYY-MM-DD | |
| folder | Yes | folder name, as returned by list_folders | |
| offset | No | newest messages to skip, for pagination | |
| subject | No | match subject text | |
| unread_only | No | only return unread messages |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| total | Yes | total messages matching, before pagination | |
| emails | Yes | newest first | |
| folder | Yes | ||
| returned | Yes | ||
| uidvalidity | Yes | folder generation; pass to get_email and attachment tools together with uid |