Search Emails
search_emailsUse this when the user wants to find specific emails on this Mac (Apple Mail — any account added to Mail.app). Searches subject and sender by default; pass scope="body" or scope="all" to also search the message body (see search_coverage in the response — a body search can be partial while its local index is still building). For a Microsoft 365 mailbox NOT added to Mail.app, use m365_search_emails.
IMPORTANT: on machines with 2+ accounts, call with account= (from list_email_accounts). Without it, and when the fast index can't answer, search_emails returns the account list instead of scanning all of them — scanning every account in one call has no time limit and can block Mail for other requests too. Exactly 1 account is unaffected.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | 20 | |
| query | Yes | ||
| scope | No | "metadata" (default, subject+sender — fast, unchanged behavior), "body" (message body only, via a local index — see search_coverage in the response), or "all" (subject+sender+body). | metadata |
| account | No | ||
| mailbox | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| count | No | ||
| query | No | ||
| results | No | ||
| warnings | No | ||
| next_actions | No | ||
| search_scope | No | ||
| search_backend | No | ||
| search_coverage | No | ||
| omitted_mailboxes | No |