Clear out a preview
sweeps_applyMove the groups a sweeps_preview counted, each to the trash - Deleted Items in Outlook - or the archive, or into a label or folder the person made in that mailbox, named by its id from labels_list, or mark a group's unread mail read where it is; Gmail moves mail by its labels, taking the inbox label off and adding Trash or the label filed into, and a mailbox held by its password into its trash, archive or label folder - a Gmail's archive being All Mail. Filing into the inbox, the bin, junk, sent mail, drafts, the archive, a Gmail tab or another label Gmail keeps itself is refused (file_refused). Each group is named by its number with the messages count the preview answered, and any count that differs refuses the whole call. Left-out mail is a group too, archived, filed or marked read, never binned: flagged 21, drafts 22, sent 23, own 24, writtenTo 25; deleted and junk mail is never moved. Binning needs a preview narrowed by senders, a domain, a subject phrase or olderThanDays of 30 or more, and leaves a group's receipts, orders, bookings, bills, account and security notices where they are (heldApart). Marking read leaves mail already read as it is (alreadyRead), so putting back never marks it unread. A message changed since the preview is left where it is. A call works for about three minutes and answers per group what moved or was marked read, what changed and what it did not reach, which stays untouched, with up to 20 failures. The same call again under the same sweep, while anything is notReached or failed as unavailable, carries on where the last stopped, settles any message a call cut short left mid-move, and counts no action against the daily allowance. A bin group names bytes, the space the mail this call moved takes, and a call that bins answers trash: binned mail keeps taking the mailbox's space until the bin is emptied, after emptiedAfterDays where its provider empties it itself, and emptyAt is where the person empties it now; archiving frees no space. sweeps_put_back puts it back until putBackUntil. 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>",
"sweep": "<sweep>",
"groups": "<groups>"
},
"name": "sweeps_apply"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sweep | Yes | The sweep handle sweeps_preview answered. | |
| groups | Yes | ||
| mailbox | Yes | The mailbox's name or its email address. | |
| onlyIfNewest | No | true acts only while this sweep's preview is still the newest of its mailbox, refused (sweep_replaced) once a newer one is held. |
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. | |
| sweep | Yes | ||
| trash | No | Present where this call bins: after how many days the provider empties its bin itself, where Lumman knows, and the page where the person empties it now. | |
| failed | Yes | ||
| groups | Yes | ||
| 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. | |
| putBackUntil | Yes |