mail_search_advanced
Search emails in IMAP mailboxes using advanced filters such as keyword, sender, receiver, subject, body, date ranges, read state, and message ID. Supports pagination and sorting.
Instructions
Primary advanced search tool: keyword, sender/receiver, subject/body, date/date-range, sent-date-range, read state, message-id.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cc | No | CC contains | |
| bcc | No | BCC contains | |
| body | No | Body contains | |
| date | No | Received on date (ISO, e.g. 2026-02-21) | |
| seen | No | Only read messages | |
| sort | No | Sort by UID (default: desc/newest-first) | desc |
| limit | No | Max results (default 50, capped globally) | |
| cursor | No | Opaque pagination cursor from previous response | |
| dateTo | No | Received until date/time (ISO). Date-only is inclusive. | |
| sender | No | Sender contains (alias for from) | |
| unseen | No | Only unread messages | |
| keyword | No | Match any text in headers and body | |
| mailbox | Yes | Folder to search (e.g. INBOX) | |
| subject | No | Subject contains | |
| dateFrom | No | Received since date/time (ISO) | |
| receiver | No | Receiver contains (alias for to) | |
| sentDate | No | Sent on date (ISO) | |
| messageId | No | Message-ID header contains | |
| returnPage | No | Return {items,nextCursor} instead of raw array | |
| sentDateTo | No | Sent until date/time (ISO). Date-only is inclusive. | |
| sentDateFrom | No | Sent since date/time (ISO) | |
| includeSnippet | No | Include short plain-text snippet per message |