mail_overview
List every mailbox with total and unread counts, unread-first, to quickly identify what is unread where and triage mail across accounts.
Instructions
Every mailbox with its message total and unread count, unread-first — the triage
entry point ("what's unread where?"). Rows are {account, account_id, mailbox,
folder, total, unread}: account_id is the same uuid every mail Pointer reports as
account, so ONE call here is the whole uuid -> name map; folder is the exact
mailbox url, so a mailbox picked here round-trips into mail_search/mail_body
without going back through name matching. Includes Junk/Trash/All Mail so you can
see what they are rather than having them silently filtered. Counts are computed
live, not read from Mail's own stored counters, which go stale, and each message is
counted ONCE even when it is filed in the same mailbox twice.
Account NAMES are looked up through Mail, so this tool does contact Mail (launching
it if it isn't running); when Mail is unreachable the account UUID stands in and
the counts — which never needed Mail — are still correct. An account Mail answers
but does not list (for example a removed one) shows "(account not in Mail)" as its
account; account_id keeps the uuid. The On My Mac store is
always shown as "On My Mac": Mail never lists it as an account.
Fast and read-only. Needs Full Disk Access for the counts and Automation access for
Mail for the account names.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |