Search messages
search_messagesSearch a mailbox folder by free text and/or structured filters (from, to, subject, body, date range, attachments). At least one filter is required. Returns message summaries with uids.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| q | No | Free-text query (searches headers and body) | |
| to | No | Match recipient | |
| body | No | Match body text | |
| from | No | Match sender | |
| folder | No | IMAP folder name (default "INBOX") | |
| mailbox | Yes | Full mailbox address, e.g. "support@yourdomain.com" | |
| subject | No | Match subject | |
| dateAfter | No | Only messages after this date (ISO 8601) | |
| dateBefore | No | Only messages before this date (ISO 8601) | |
| hasAttachment | No | Only messages with attachments |