summarizeSenders
summarizeSendersCount locally synced emails by sender address or domain to see message volume per sender and where messages are filed, with optional folder, date, query, and sender filters.
Instructions
Count locally synced messages by sender address or domain in one connection, with each sender's dates and folders, to see who sends how much and where it is filed. Without filters it covers the whole local mailbox; optionally restrict by folder and dates, or by query and field with the same syntax as search, for example to preview what a mail rule would match; from adds one sender address to a query. The totals state what the counts cover, including messages without a date or a parsable sender.
Counts do not show mailbox rules or when messages were moved: old messages left in a folder do not prove that a rule fails, so compare each folder's dates. A sender does not define a message's purpose; list or search that sender's cards with search before recommending anything.
messages counts recognized copies once; folders counts every stored copy, so its sum can exceed messages.
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": {
"connection": "<connection>"
},
"name": "summarizeSenders"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| from | No | Only messages from this one complete sender address, ignoring case. Combines with query and field | |
| field | No | Field group for query, as in search; default any. Without query, field has no effect | |
| limit | No | Senders per page: 1 to 200, default 50; larger values are capped at 200 | |
| query | No | Search terms, a quoted phrase or a full email address, as in search; at most 1000 characters. Omit to count all messages | |
| since | No | Include messages at or after this date/time, using the message Date header, in the same format as search. Messages without a date are excluded | |
| until | No | Include messages strictly before this date/time; same header and format as since. Messages without a date are excluded | |
| folder | No | One folder key from listFolders, not its display name. Omit to count all folders in the connection | |
| offset | No | Default 0. For the next page, repeat the same arguments and use the previous nextOffset. Stop when there is no nextOffset | |
| groupBy | No | address (default) or domain | |
| connection | Yes | Connection name from listConnections |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| from | No | Applied sender address filter. | |
| field | Yes | Field searched. | |
| query | No | Text query; absent when not given. | |
| since | No | Applied since bound, in UTC. | |
| total | Yes | Sender rows across all pages. | |
| until | No | Applied until bound, in UTC. | |
| folder | No | Folder key counted; absent for all folders. | |
| latest | No | Latest date among matching messages; absent when none has a date. | |
| offset | Yes | Position of this page. | |
| groupBy | Yes | address or domain. | |
| senders | Yes | Senders, most messages first. | |
| undated | Yes | Matching messages without a date. | |
| earliest | No | Earliest date among matching messages; absent when none has a date. | |
| messages | Yes | All matching messages; copies of one message count once. | |
| connection | Yes | Connection name. | |
| nextOffset | No | Pass as offset to get the next page; absent at the end. | |
| withoutSender | Yes | Matching messages without a parsable sender, such as failed messages; they are in no row. |