mail_find
Search Apple Mail's local database for exact email copies by subject, sender, recipient, Message-ID, or date; returns JSON rows without semantic indexing delays.
Instructions
Exact email lookup in Mail's own database (not the semantic index, so it never waits on indexing and matches filters exactly). Returns JSON: one row per copy (the same Message-ID in INBOX and Sent is two rows) with message_id, subject, from, from_name, to, received, mailbox, account_id. Needs at least one of subject_prefix, subject_contains, from_name_contains, from, to, message_ids. Trash is excluded unless include_trash or mailboxes asks for it. Pair with mail_trash message_ids to clear what it finds, or mail_unjunk to move Junk copies to the Inbox.
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": "mail_find"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | Exact recipient address (To or Cc) | |
| from | No | Exact sender address | |
| limit | No | Maximum rows (default 50, max 500); 'truncated' says when more matched | |
| from_me | No | Only messages sent from one of your own addresses (any address that appears as a sender in a Sent mailbox) | |
| to_only | No | With to: that address is the only recipient | |
| mailboxes | No | Only these mailbox kinds (default: every mailbox except trash) | |
| message_ids | No | RFC822 Message-IDs (finds every copy) | |
| include_trash | No | Also return copies already in Trash (default false) | |
| received_after | No | ISO 8601 date/time; only messages received at or after it | |
| subject_prefix | No | Subject starts with this text (case-insensitive), e.g. '[Network] ' | |
| received_before | No | ISO 8601 date/time; only messages received before it | |
| older_than_hours | No | Only messages received more than this many hours ago | |
| subject_contains | No | Subject contains this text (case-insensitive) | |
| from_name_contains | No | Sender display name contains this text (case-insensitive; Mail stores the name decoded), e.g. 'via Cloaked' |