get_statistics
Aggregate mailbox statistics including message volume, read/unread/flagged counts, read ratio, and top senders over a configurable time window.
Instructions
Aggregate inbox statistics over a mailbox and time window.
A read-only analytics roll-up computed from a single search_messages
pass — message volume, read/unread/flagged counts, read ratio, and the
top senders (by full address or domain). This is the consolidated
inbox-stats tool; per-folder unread counts live on list_mailboxes
and are not duplicated here.
The window defaults to the last ~30 days (received_within_hours=720);
pass date_from/date_to for an explicit range. Stats are computed
over at most scan_limit of the most recent messages in the window —
window_fully_covered is False when the window held more than that,
so the numbers are a recent-sample rather than a silent truncation.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| by | No | Group top senders by "address" (default) or "domain". | address |
| account | Yes | Mail.app account name (e.g. "Gmail"). Required. | |
| date_to | No | ISO date upper bound. | |
| mailbox | No | Mailbox to summarize (default "INBOX"). | INBOX |
| date_from | No | ISO date lower bound (composes with the window). | |
| scan_limit | No | Max messages aggregated (default 500; bounds cost). | |
| top_senders_limit | No | How many top senders to return (default 10). | |
| received_within_hours | No | Window size in hours (default 720 ≈ 30 days). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||