search_messages
Search Apple Mail messages by account, mailbox, date range, unread status, and subject, sender, or body text; returns lightweight summaries for quick triage.
Instructions
Search messages in a mailbox. Returns lightweight summaries.
Args:
account: Account name (from list_accounts).
mailbox: Mailbox name (from list_mailboxes). When omitted (or set to
"@inbox"), the server auto-detects the account's inbox by trying
the common localizations (INBOX, Bandeja de entrada, Posteingang,
Boîte de réception, Caixa de entrada, etc.).
since: ISO 8601 timestamp; only messages received at or after are returned.
Defaults to 7 days ago if not provided — without a date floor,
the script must materialize the entire mailbox, which is ruinous
on large iCloud inboxes. Pass an explicit older date if you need
to look further back.
before: ISO 8601 timestamp; only messages received strictly before are returned.
limit: Max results, capped at 500. Default 50.
unread_only: If true, only return unread messages.
query: Case-insensitive substring filter. Scope set by field.
field: Where query is matched. One of:
"subject" — subject line only
"sender" — sender name + address
"content" — full body text (slower; iterates message content)
"all" — subject + sender (default; content excluded for perf)
Returns a list of {id, message_id, account, mailbox, subject, sender,
date_received, read, snippet}. Use id with get_thread to fetch the full body.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"account": "<account>"
},
"name": "search_messages"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| field | No | all | |
| limit | No | ||
| query | No | ||
| since | No | ||
| before | No | ||
| account | Yes | ||
| mailbox | No | ||
| unread_only | No |