sender_stats
Identify top email senders in a mailbox over a chosen time window, see each sender's unsubscribe method, and report how many messages were counted.
Instructions
Top senders by message count over a time window, each with how it can be unsubscribed from (one-click, mailto, link-only, none). Reports how many messages it counted. Gmail allows about 300 messages a minute per mailbox, so a month of a busy mailbox takes several minutes; tell the user before starting a long window.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"mailbox": "<mailbox>",
"window": "<window>"
},
"name": "sender_stats"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| top | No | Senders to return, default 25 | |
| query | No | Optional extra Gmail search, e.g. "category:promotions" | |
| window | Yes | Gmail newer_than value: 30d, 6m, 1y | |
| mailbox | Yes | A connected mailbox address (see list_mailboxes) | |
| max_messages | No | Messages to count, default 5000, at most 20000 |