Search Emails
search_emailsSearch your mailbox by sender, recipient, subject, body, date, size, status, or attachment presence to pinpoint specific emails and get summaries for quick review.
Instructions
Search the live mailbox by sender, recipient (To/CC/BCC), subject, body content, date range (received or sent), size, read/replied/starred/draft status, or attachment presence. Uses server-side IMAP SEARCH except hasAttachment, which filters locally. Use fts_search only for faster local ranked search after its index is built. Use folder for one folder or folders for many (pass ["*"] for all); returns summaries, so use get_email_by_id for full content.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | Filter by recipient address | |
| bcc | No | Filter by BCC recipient | |
| body | No | Search within email body content | |
| from | No | Filter by sender address or name | |
| text | No | Search headers and body (full text) | |
| limit | No | Max results (1-200, default 50) | |
| dateTo | No | ISO 8601 end date (INTERNALDATE — when received by server) | |
| folder | No | Single folder to search (ignored if `folders` is set) | INBOX |
| isRead | No | ||
| larger | No | Minimum email size in bytes | |
| folders | No | Search multiple folders. Use ["*"] to search all folders (capped at 20). Overrides `folder`. | |
| isDraft | No | Filter by draft status | |
| smaller | No | Maximum email size in bytes | |
| subject | No | Filter by subject text | |
| answered | No | Filter by whether email has been replied to | |
| dateFrom | No | ISO 8601 start date (INTERNALDATE — when received by server) | |
| isStarred | No | ||
| sentSince | No | Filter by Date: header since this date (ISO 8601) | |
| account_id | No | Optional account ID to route this call to (multi-account configs). Omit to use the active account. Configured account IDs are listed in the settings UI (Accounts tab). | |
| sentBefore | No | Filter by Date: header before this date (ISO 8601) | |
| hasAttachment | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| count | Yes | ||
| emails | Yes | ||
| folder | Yes |