Preview a clear-out
sweeps_previewCount who fills one folder of a mailbox, the inbox unless folder names another, before clearing it out by sender - newsletters, promotions and notifications a group at a time rather than thread by thread, each group sweeps_apply moves once the person approves it; nothing is moved. The answer numbers the 20 senders with the most mail there, each with its count, how many are unread, its newest and oldest dates, two of its subjects, and heldApart: how many are receipts, orders, bookings, bills, account or security notices. otherSenders and otherMessages count the rest, and nextSenders names the next 20 of them by address with how many messages each has, for another preview to name in senders. A sender whose name screens as a prompt attack is withheld with its group, which takes no number, counted under withheldSenders and withheldMessages; a subject that does leaves its group's subjects, counted under withheldSubjects; a next sender's address that does leaves nextSenders, counted under withheldNextSenders. rankBy space finds what fills a full mailbox: the senders are ranked by the space their mail takes, each group naming it in bytes, and largest names the 10 largest messages the groups counted by group, bytes, date and subject - a subject that screens as a prompt attack null, marked withheldSubject. Flagged mail, drafts, the person's own messages, mail from people they write to, and everything in sent, drafts, deleted or junk is in no group, counted under leftOut instead. At most the newest 10,000 messages of an Outlook folder, or of a mailbox held by its password, are read, and notReadBefore names the date before which a larger folder was not. A mailbox held by its password is cleared out only where its mail server names where it moves each message, and a Gmail held by its password out of its inbox alone. Gmail allows few reads a minute, so only the newest 150 of a Gmail folder are read: they choose the groups, and each group's messages then counts all its sender's mail the preview asks for, up to 10,000 in all, unless the preview narrows by subject or ranks by space; its other figures, otherSenders, otherMessages, nextSenders and leftOut count the messages read, and folderTotal is Gmail's own estimate. actionsLeft is how many actions this account has left in its allowance after this call. sweep is the handle sweeps_apply clears what was counted by, held an hour; what an apply moves can be put back until putBackUntil at the earliest. The times it answers with carry their offset in the person's own time zone, which the answer names under now beside their time now in it - UTC where the person has stored no zone, as now says.
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>"
},
"name": "sweeps_preview"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tab | No | Gmail alone: only the mail in this tab of its inbox is counted, as focus counts Outlook's Focused or Other. | |
| list | No | Only mail from this mailing list is counted, by its list id: what a message's listId holds between its angle brackets, as news.example.com. | |
| focus | No | Outlook alone: only the mail Outlook sorts into Focused, or only that in Other, is counted. Outlook sorts its inbox alone. | |
| domain | No | Only mail from this domain or one under it is counted, as example.com. | |
| folder | No | The folder to read, inbox by default; all of sent, drafts, deleted and junk is left out. | |
| rankBy | No | Ranks the senders by how many messages each has where count, the default, or by the space their mail takes where space. | |
| unread | No | true counts only unread mail, false only read mail. | |
| mailbox | Yes | The mailbox's name or its email address. | |
| senders | No | Only mail from these addresses is counted. | |
| subject | No | Only mail whose subject holds this phrase, letter case aside, is counted. | |
| keepNewest | No | The newest this many of each sender's messages are left out of the count, so only the rest is counted. | |
| olderThanDays | No | Only mail that arrived more than this many days ago is counted. | |
| excludeSubjects | No | Mail whose subject holds any of these phrases is left out of the count. | |
| largerThanBytes | No | Only mail larger than this many bytes is counted, as 5000000 for mail over 5 MB. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| now | Yes | The person's own time zone, in which every time this answer gives is written, and their time now in it. | |
| read | Yes | ||
| sweep | Yes | ||
| groups | Yes | ||
| largest | No | Ranked by space: the largest messages the groups counted, largest first, each by its group, its bytes, date and subject. | |
| leftOut | Yes | ||
| notRead | No | ||
| newestOnly | No | The folders whose provider showed only their newest messages, each with how many it showed: every one holds more, and nothing before those was read, searched, counted or acted on, so finding nothing there says nothing of the rest. | |
| actionsLeft | No | ||
| folderTotal | Yes | ||
| nextSenders | No | ||
| otherSenders | Yes | ||
| putBackUntil | Yes | ||
| notReadBefore | Yes | ||
| otherMessages | Yes | ||
| withheldSenders | No | ||
| withheldMessages | No | ||
| withheldNextSenders | No |