mail_stats
Generates email statistics for a selected period, including received, unread, flagged, and sent counts by account and mailbox, top senders, and newsletters with unsubscribe guidance.
Instructions
Figures for a period (default the last 30 days), for all mail, an account or a mailbox: messages received, unread, flagged and sent, by account and mailbox, the most frequent senders, and the newsletters among them with how to leave each.
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_stats"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| top | No | How many top senders and newsletters (default 10, max 25). | |
| after | No | From this date (YYYY-MM-DD; default 30 days ago). | |
| before | No | Before this date (YYYY-MM-DD; default now). | |
| account | No | Account name, as list_mailboxes gives it. | |
| mailbox | No | A mailbox name or path. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| from | Yes | ||
| sent | Yes | Messages the user sent. | |
| until | Yes | ||
| unread | Yes | ||
| flagged | Yes | ||
| received | Yes | Messages received (sent mail, drafts, junk and trash aside). | |
| by_account | Yes | ||
| by_mailbox | Yes | The mailboxes holding most of what was received. | |
| newsletters | Yes | Newsletters and mailing lists among the senders, most frequent first. | |
| top_senders | Yes |