Search emails
search_emailsFind emails by keyword, sender, recipient, date range, attachment, size, or reply status. Omit keyword to filter by sender or other criteria.
Instructions
Search emails by keyword across subject, sender, and body — and, where the local mirror is enabled, attachment filenames (searching "report" finds an email carrying Q3-report.pdf). Omit query (or pass an empty string) to use it as a pure filter — e.g. find all emails from a specific sender without a keyword. Supports additional filters for sender, recipient, date range (since/before — INTERNALDATE; sent_since/sent_before — Date: header), attachments, size, and reply status. At least one of query/from/to/since/before/sent_since/sent_before/has_attachment/larger_than/smaller_than/answered must be set; otherwise the call errors (use list_emails to browse without filters). Results carry the same 📰 newsletter / 🤖 automated markers as list_emails.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | Filter by recipient address | |
| from | No | Filter by sender address (substring match) | |
| page | No | Page number | |
| query | No | Search keyword across subject, sender, and body (omit to use filters only) | |
| since | No | Only emails received on/after this date (ISO 8601, e.g. 2026-05-11T00:00:00Z) | |
| before | No | Only emails received before this date (ISO 8601) | |
| account | Yes | Account name from list_accounts | |
| mailbox | No | Mailbox path (default: INBOX) | INBOX |
| preview | No | Include a ~200 character body preview per message. Off by default: it fetches extra bytes per message and lengthens the output. | |
| answered | No | Filter: true=replied, false=not replied | |
| pageSize | No | Results per page | |
| sent_since | No | Only emails with Date: header on/after this date (ISO 8601) | |
| larger_than | No | Minimum email size in KB | |
| sent_before | No | Only emails with Date: header before this date (ISO 8601) | |
| smaller_than | No | Maximum email size in KB | |
| has_attachment | No | Filter: true=has attachments, false=no attachments |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | Yes | ||
| cache | No | ||
| count | Yes | ||
| total | Yes | ||
| emails | Yes | ||
| account | Yes | ||
| hasMore | Yes | ||
| mailbox | Yes | ||
| pageSize | Yes |