Search mail
search_mailSearch this Mac's mail. All filters are optional and combined with AND. subject/sender/date filters run against Mail's own index and are fast, and so do to_contains, cc_contains and participant (sender, To or Cc), which match an address or a name: use participant to find mail someone was on, cc'd or not. body_contains is different: Mail does not index body text, so it is applied by reading candidate messages off disk AFTER the other filters, so always pair it with a sender, subject, or since filter, and expect truncated_body_scan=true if the candidate pool ran out before limit was reached. Dates accept ISO ('2026-08-01') or unix seconds. category (e.g. 'Personal') limits the search to accounts with that label. Accounts are labelled (Personal, Work, ...). For a personal task use the Personal accounts; call list_categories if unsure.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| since | No | ||
| until | No | ||
| sender | No | ||
| account | No | ||
| subject | No | ||
| category | No | ||
| cc_contains | No | ||
| participant | No | ||
| to_contains | No | ||
| unread_only | No | ||
| flagged_only | No | ||
| body_contains | No | ||
| has_attachments | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| count | Yes | ||
| results | Yes | ||
| truncated_body_scan | Yes | ||
| body_unavailable_count | No |