Skip to main content
Glama

Preview a clear-out

sweeps_preview
Read-only

Count 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. 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; 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 daily 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.

Input Schema

NameRequiredDescriptionDefault
tabNoGmail alone: only the mail in this tab of its inbox is counted, as focus counts Outlook's Focused or Other.
listNoOnly 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.
focusNoOutlook alone: only the mail Outlook sorts into Focused, or only that in Other, is counted. Outlook sorts its inbox alone.
domainNoOnly mail from this domain or one under it is counted, as example.com.
folderNoThe folder to read, inbox by default; all of sent, drafts, deleted and junk is left out.
unreadNotrue counts only unread mail, false only read mail.
mailboxYesThe mailbox's name or its email address.
sendersNoOnly mail from these addresses is counted.
subjectNoOnly mail whose subject holds this phrase, letter case aside, is counted.
keepNewestNoThe newest this many of each sender's messages are left out of the count, so only the rest is counted.
olderThanDaysNoOnly mail that arrived more than this many days ago is counted.
excludeSubjectsNoMail whose subject holds any of these phrases is left out of the count.
largerThanBytesNoOnly mail larger than this many bytes is counted, as 5000000 for mail over 5 MB.

Output Schema

NameRequiredDescriptionDefault
nowYesThe person's own time zone, in which every time this answer gives is written, and their time now in it.
readYes
sweepYes
groupsYes
leftOutYes
notReadNo
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.
actionsLeftNo
folderTotalYes
nextSendersNo
otherSendersYes
putBackUntilYes
notReadBeforeYes
otherMessagesYes
withheldSendersNo
withheldMessagesNo
withheldNextSendersNo

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. Changed10 schema fields changed
    • changedInput schema / properties / domain / description
      Previous value: -"Count only mail from this domain or one under it, as example.com."New value: +"Only mail from this domain or one under it is counted, as example.com."
    • changedInput schema / properties / excludeSubjects / description
      Previous value: -"Leave out of the count mail whose subject holds any of these phrases."New value: +"Mail whose subject holds any of these phrases is left out of the count."
    • changedInput schema / properties / focus / description
      Previous value: -"Outlook alone: count only the mail Outlook sorts into Focused, or only that in Other. Outlook sorts its inbox alone."New value: +"Outlook alone: only the mail Outlook sorts into Focused, or only that in Other, is counted. Outlook sorts its inbox alone."
    • changedInput schema / properties / keepNewest / description
      Previous value: -"Leave the newest this many of each sender's messages out of the count, so only the rest is counted."New value: +"The newest this many of each sender's messages are left out of the count, so only the rest is counted."
    • changedInput schema / properties / largerThanBytes / description
      Previous value: -"Count only mail larger than this many bytes, as 5000000 for mail over 5 MB."New value: +"Only mail larger than this many bytes is counted, as 5000000 for mail over 5 MB."
    • changedInput schema / properties / list / description
      Previous value: -"Count only mail from this mailing list, by its list id: what a message's listId holds between its angle brackets, as news.example.com."New value: +"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."
    • changedInput schema / properties / olderThanDays / description
      Previous value: -"Count only mail that arrived more than this many days ago."New value: +"Only mail that arrived more than this many days ago is counted."
    • changedInput schema / properties / senders / description
      Previous value: -"Count only mail from these addresses."New value: +"Only mail from these addresses is counted."
    • changedInput schema / properties / subject / description
      Previous value: -"Count only mail whose subject holds this phrase, letter case aside."New value: +"Only mail whose subject holds this phrase, letter case aside, is counted."
    • changedInput schema / properties / tab / description
      Previous value: -"Gmail alone: count only the mail in this tab of its inbox, as focus counts Outlook's Focused or Other."New value: +"Gmail alone: only the mail in this tab of its inbox is counted, as focus counts Outlook's Focused or Other."
  3. Changed6 schema fields changed
    • addedInput schema / properties / focus
      Added value: +{
      +  "description": "Outlook alone: count only the mail Outlook sorts into Focused, or only that in Other. Outlook sorts its inbox alone.",
      +  "enum": [
      +    "focused",
      +    "other"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / largerThanBytes
      Added value: +{
      +  "description": "Count only mail larger than this many bytes, as 5000000 for mail over 5 MB.",
      +  "maximum": 2147483647,
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • addedInput schema / properties / list
      Added value: +{
      +  "description": "Count only mail from this mailing list, by its list id: what a message's listId holds between its angle brackets, as news.example.com.",
      +  "pattern": "^[a-z0-9_-]+(?:\\.[a-z0-9_-]+)+$",
      +  "type": "string"
      +}
    • addedInput schema / properties / tab
      Added value: +{
      +  "description": "Gmail alone: count only the mail in this tab of its inbox, as focus counts Outlook's Focused or Other.",
      +  "enum": [
      +    "primary",
      +    "social",
      +    "promotions",
      +    "updates",
      +    "forums"
      +  ],
      +  "type": "string"
      +}
    • addedOutput schema / properties / nextSenders
      Added value: +{
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "address": {
      +        "type": "string"
      +      },
      +      "messages": {
      +        "type": "number"
      +      }
      +    },
      +    "required": [
      +      "address",
      +      "messages"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / withheldNextSenders
      Added value: +{
      +  "type": "number"
      +}
  4. Changed2 schema fields changed
    • changedOutput schema / properties / folderTotal / type
      Previous value: -"number"New value: +[
      +  "number",
      +  "null"
      +]
    • addedOutput schema / properties / notRead
      Added value: +{
      +  "items": {
      +    "enum": [
      +      "count",
      +      "sentMail",
      +      "messages"
      +    ],
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
  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",
      -  "read",
      -  "folderTotal",
      -  "notReadBefore",
      -  "groups",
      -  "otherSenders",
      -  "otherMessages",
      -  "leftOut"
      -]New value: +[
      +  "sweep",
      +  "putBackUntil",
      +  "read",
      +  "folderTotal",
      +  "notReadBefore",
      +  "groups",
      +  "otherSenders",
      +  "otherMessages",
      +  "leftOut",
      +  "now"
      +]
  6. Changed1 schema field changed
    • addedInput schema / properties / keepNewest
      Added value: +{
      +  "description": "Leave the newest this many of each sender's messages out of the count, so only the rest is counted.",
      +  "maximum": 9007199254740991,
      +  "minimum": 1,
      +  "type": "integer"
      +}
  7. Changed1 schema field changed
    • changedInput schema / properties / unread / description
      Previous value: -"true counts only unread mail."New value: +"true counts only unread mail, false only read mail."
  8. Changed3 schema fields changed
    • addedOutput schema / properties / groups / items / properties / withheldSubjects
      Added value: +{
      +  "type": "number"
      +}
    • addedOutput schema / properties / withheldMessages
      Added value: +{
      +  "type": "number"
      +}
    • addedOutput schema / properties / withheldSenders
      Added value: +{
      +  "type": "number"
      +}
  9. Changed3 schema fields changed
    • addedOutput schema / properties / putBackUntil
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / sweep
      Added value: +{
      +  "type": "string"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "read",
      -  "folderTotal",
      -  "notReadBefore",
      -  "groups",
      -  "otherSenders",
      -  "otherMessages",
      -  "leftOut"
      -]New value: +[
      +  "sweep",
      +  "putBackUntil",
      +  "read",
      +  "folderTotal",
      +  "notReadBefore",
      +  "groups",
      +  "otherSenders",
      +  "otherMessages",
      +  "leftOut"
      +]
  10. Added

TDQS

A4/5.0
Behavior5/5

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

Annotations already mark this as read-only and non-destructive, but the description adds substantial behavioral context: read caps of 10,000 messages and 150 for Gmail, prompt-attack withholding, leftOut categories, actionsLeft, a one-hour sweep handle, and time-zone offsets. It does not contradict the annotations.

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 dense, run-on block with many clauses and little structure, making it hard to scan. It contains useful caveats, but it is overlong and poorly front-loaded for its purpose.

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 13-parameter preview tool with an output schema, it covers the important read limits, output fields, withholding behavior, and time-zone handling comprehensively. Nothing essential appears missing, though the density hurts usability.

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

Parameters3/5

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

Schema description coverage is 100%, so the baseline is 3. The description adds some meaning beyond the schema by relating senders to nextSenders and subject narrowing, and by noting the default folder and excluded folders, but most parameter semantics are already supplied by the schema.

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

Purpose4/5

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

The description opens by stating it counts senders in one mailbox folder before a clear-out and explicitly contrasts with sweeps_apply, which performs the move. The verb, resource, and scope are specific, though the phrase 'Count who fills one folder' is less direct than it could be.

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?

It tells the agent this is the preview step before sweeps_apply and that nothing is moved, and it names sweeps_apply as the tool that executes approved groups. It does not spell out when-not scenarios beyond the read-only preview/apply split.

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.