mail_search_messages
Search an entire mailbox folder's retained message history via IMAP. Combine filters with AND/OR, match headers, dates, or properties, and page results across folders.
Instructions
Search the entire retained history of one folder using server IMAP search. Fields combine with AND; anyOf children combine with OR. headers supports Message-ID, References, In-Reply-To and arbitrary headers (string substring or true for existence). No implicit date cutoff. Search is server-defined and does not OCR or search inside binary attachments. Repeat across folders and all cursors for account-wide coverage. Results exceeding 64 KiB are saved completely to a private JSON file and return a compact summary with completeResultFile.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | ||
| cursor | No | ||
| folder | Yes | ||
| pageSize | No | ||
| accountId | Yes |