Skip to main content
Glama

Clear out a preview

sweeps_apply
DestructiveIdempotent

Move 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. 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.

Input Schema

NameRequiredDescriptionDefault
sweepYesThe sweep handle sweeps_preview answered.
groupsYes
mailboxYesThe mailbox's name or its email address.
onlyIfNewestNotrue 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

NameRequiredDescriptionDefault
nowYesThe person's own time zone, in which every time this answer gives is written, and their time now in it.
sweepYes
failedYes
groupsYes
newestOnlyNoThe 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.
putBackUntilYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedOutput schema / properties / newestOnly
      Added value: +{
      +  "description": "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.",
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "folder": {
      +        "type": "string"
      +      },
      +      "shown": {
      +        "type": "number"
      +      }
      +    },
      +    "required": [
      +      "folder",
      +      "shown"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
  2. Changed1 schema field changed
    • addedInput schema / properties / onlyIfNewest
      Added value: +{
      +  "description": "true acts only while this sweep's preview is still the newest of its mailbox, refused (sweep_replaced) once a newer one is held.",
      +  "type": "boolean"
      +}
  3. Changed3 schema fields changed
    • changedInput schema / properties / groups / items / properties / action / enum
      Previous value: -[
      -  "bin",
      -  "archive",
      -  "read"
      -]New value: +[
      +  "bin",
      +  "archive",
      +  "read",
      +  "file"
      +]
    • addedInput schema / properties / groups / items / properties / label
      Added value: +{
      +  "description": "For file alone: the id labels_list gives the label or folder the group goes into.",
      +  "pattern": "^[A-Za-z0-9_=-]{1,512}$",
      +  "type": "string"
      +}
    • changedOutput schema / properties / groups / items / properties / action / enum
      Previous value: -[
      -  "bin",
      -  "archive",
      -  "read"
      -]New value: +[
      +  "bin",
      +  "archive",
      +  "read",
      +  "file"
      +]
  4. Changed3 schema fields changed
    • changedInput schema / properties / groups / items / properties / action / enum
      Previous value: -[
      -  "bin",
      -  "archive"
      -]New value: +[
      +  "bin",
      +  "archive",
      +  "read"
      +]
    • changedOutput schema / properties / groups / items / properties / action / enum
      Previous value: -[
      -  "bin",
      -  "archive"
      -]New value: +[
      +  "bin",
      +  "archive",
      +  "read"
      +]
    • addedOutput schema / properties / groups / items / properties / alreadyRead
      Added value: +{
      +  "type": "number"
      +}
  5. Changed2 schema fields changed
    • addedOutput schema / properties / now
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "The person's own time zone, in which every time this answer gives is written, and their time now in it.",
      +  "properties": {
      +    "noneStored": {
      +      "description": "Present where the person has stored no time zone: that every time here is UTC, and how one gets stored.",
      +      "type": "string"
      +    },
      +    "time": {
      +      "type": "string"
      +    },
      +    "timeZone": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "timeZone",
      +    "time"
      +  ],
      +  "type": "object"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "sweep",
      -  "putBackUntil",
      -  "groups",
      -  "failed"
      -]New value: +[
      +  "sweep",
      +  "putBackUntil",
      +  "groups",
      +  "failed",
      +  "now"
      +]
  6. Added

TDQS

A4.4/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Beyond the annotations, the description discloses extensive behavior: refused filing targets, heldApart protections, alreadyRead behavior, notReached and failure limits, the three-minute call window, resumption semantics under the same sweep, daily allowance treatment, and timezone reporting. These details are consistent with destructiveHint=true and idempotentHint=true.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sprawling, telegraphic block with semicolon-separated clauses that is difficult to scan. Most content is relevant, but the run-on structure and lack of grouping undermine front-loading and readability.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a complex destructive batch tool, the description covers preconditions, safety exclusions, failure limits, idempotent resumption, and response-time semantics. The output schema can carry the exact return shape, so the description is complete enough for an agent to call it safely.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is already 75%, but the description adds meaning: group numbers and message counts must match the preview, label ids come from labels_list, action outcomes are explained through bin/archive/read/file prose, and mailbox password handling is described. onlyIfNewest is left to the schema, which keeps this below a full 5.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource: it moves the groups counted by sweeps_preview into trash, archive, labels, or read state. It also distinguishes the tool from sweeps_preview and sweeps_put_back, so an agent can tell this applies a preview and mutates mail.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description makes clear that groups must come from sweeps_preview, that message counts must match the preview, and that binning requires a suitably narrowed preview. It also names sweeps_put_back for reversal. It stops short of explicit routing guidance versus direct siblings such as threads_trash or threads_archive, but the preconditions and refusal cases cover most usage decisions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.