Skip to main content
Glama

sweep_snoozed

Idempotent

Resurface due snoozed email threads by returning them to the inbox unread in batches; run a dry run to preview due items without changing anything.

Instructions

Resurface all snoozed threads whose date is due (<= today), batched at 1000 messages per API request. Set dryRun:true to rehearse: reports the due labels and threads (dueLabels/dueThreads) as the sweep would find them (from the live label listing; a single snooze label with more than 5000 messages is under-counted in the rehearsal), and wakes nothing. USE WHEN: the user asks to process due snoozes, or as a scheduled maintenance call; dryRun to answer 'what is due right now?' without acting. SIDE EFFECTS: due threads return to the inbox marked unread (none with dryRun); safe to run repeatedly. failedCount/errors report messages a batch could not wake (their label is kept for the next sweep).

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "sweep_snoozed"
  }
}

Input Schema

NameRequiredDescriptionDefault
dryRunNo

Output Schema

NameRequiredDescriptionDefault
dateYes
wokenYes
dryRunYes
errorsYes
dueLabelsYes
dueThreadsYes
wokenCountYes
failedCountYes
dueThreadCountYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.32.0
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. Changed1 schema field changedv0.25.0
    • removedInput schema / additionalProperties
      Removed value: -false
  3. Changed8 schema fields changedv0.11.0
    • addedInput schema / $schema
      Added value: +"http://json-schema.org/draft-07/schema#"
    • addedInput schema / additionalProperties
      Added value: +false
    • addedInput schema / properties / dryRun
      Added value: +{
      +  "default": false,
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / dryRun
      Added value: +{
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / dueLabels
      Added value: +{
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / dueThreadCount
      Added value: +{
      +  "type": "number"
      +}
    • addedOutput schema / properties / dueThreads
      Added value: +{
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "date",
      -  "wokenCount",
      -  "woken",
      -  "failedCount",
      -  "errors"
      -]New value: +[
      +  "date",
      +  "dryRun",
      +  "dueLabels",
      +  "dueThreadCount",
      +  "dueThreads",
      +  "wokenCount",
      +  "woken",
      +  "failedCount",
      +  "errors"
      +]
  4. First observedv0.1.8

TDQS

A4.7/5.0
Behavior5/5

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

Beyond the annotations, it discloses the batch size (1000 messages per API request), the exact side effect (threads return to inbox marked unread), that dryRun wakes nothing, that the operation is safe to repeat, and how partial failures surface via failedCount/errors with the label retained. It even flags a known rehearsal under-count caveat for labels over 5000 messages, which annotations could never convey.

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

Conciseness4/5

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

Purpose, usage, side effects, and failure reporting are front-loaded in roughly that order, with no filler. The nested parenthetical about the rehearsal under-count is dense and slightly hard to parse on first read, which keeps it from a 5.

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?

An output schema exists, so return values need not be spelled out, yet the description still highlights the fields that matter operationally (dueLabels/dueThreads, failedCount/errors). For a single-parameter bulk mutation, an agent has everything needed to decide and call correctly.

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

Parameters5/5

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

The single dryRun parameter has 0% schema description coverage, so the description carries the burden — and it does: it defines rehearsal behavior, names the returned dueLabels/dueThreads, and states that nothing is woken. That is meaning well beyond the boolean's type and default.

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 opens with a specific verb and resource plus the exact selection rule: 'Resurface all snoozed threads whose date is due (<= today)'. That distinguishes it from single-thread siblings like snooze/unsnooze/list_snoozed, which are per-item or read-only, without needing to name them.

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?

'USE WHEN: the user asks to process due snoozes, or as a scheduled maintenance call' gives a clear trigger, and the dryRun sentence gives the exact condition for rehearsal mode. It stops short of explicitly naming alternatives (e.g., list_snoozed for a pure listing, unsnooze for one thread), so it is strong but not fully comparative.

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