search_emails
Search iCloud Mail by keywords or specific fields like sender, subject, or date with filters for unread status, attachments, and domain.
Instructions
Search emails by keyword or targeted field queries, with optional filters for date, read status, domain, and more
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "search_emails"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Max results (default 10) | |
| query | No | Search keyword (matches subject, sender, body — use OR across all fields) | |
| since | No | Only emails since this date (YYYY-MM-DD) | |
| before | No | Only emails before this date (YYYY-MM-DD) | |
| domain | No | Match any sender from this domain (e.g. substack.com) | |
| larger | No | Only emails larger than this size in KB | |
| sender | No | Match exact sender email address | |
| unread | No | True for unread only, false for read only | |
| account | No | Account name to use (e.g. 'icloud', 'gmail'). Defaults to first configured account. Use list_accounts to see available accounts. | |
| flagged | No | True for flagged only, false for unflagged only | |
| mailbox | No | Mailbox to search (default INBOX) | |
| smaller | No | Only emails smaller than this size in KB | |
| subject | No | Keyword to match in subject | |
| bodyQuery | No | Match only in body field | |
| fromQuery | No | Match only in from/sender field | |
| queryMode | No | How to combine subjectQuery/bodyQuery/fromQuery: or (default) or and | |
| subjectQuery | No | Match only in subject field | |
| hasAttachment | No | Only emails with attachments (client-side BODYSTRUCTURE scan — must be combined with other filters that narrow results to under 500 emails first) | |
| includeSnippet | No | If true, include a 200-char body preview snippet for each result (max 10 emails) |