Skip to main content
Glama
psdgator

Multi Gmail Account MCP

by psdgator

Bulk clean-up with preview

bulk_cleanup
Destructive

Archive, mark as read, label, or trash every email matching a search in one Gmail account. Preview matches first with a dry run, then confirm to apply the action safely.

Instructions

Archive, mark as read, label, or move to Trash every email matching a search in one account. ALWAYS two steps: first call with dryRun=true (default) to get a preview and a confirmToken, show the preview to the user, and only after they agree call again with the same arguments, dryRun=false and that confirmToken. Archive / mark read / label need drafts mode; trash needs full mode (recoverable for 30 days in Gmail).

Input Schema

NameRequiredDescriptionDefault
maxNoAt most this many emails (default 200; trash max 500).
labelNoFor action "label": label name to add.
queryYesSearch selecting the emails, e.g. "from:newsletter@shop.gr older_than:30d".
actionYes
dryRunNoPreview only (default true).
accountNoAccount alias or email address. Omit to use the default account. No accounts connected yet.
confirmTokenNoToken from the preview; required when dryRun=false.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A4.3/5.0
Behavior5/5

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

Goes well past the destructiveHint/openWorldHint annotations by disclosing the preview-and-confirm safeguard, the confirmToken requirement, the drafts-vs-full mode dependency per action, and the 30-day recoverability window for trash. These are exactly the behavioral facts an agent needs before attempting a destructive bulk operation.

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

Conciseness5/5

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

Three tight sentences, front-loaded with the destructive action list, then the mandatory two-step protocol, then mode constraints. No filler and nothing repeated from the schema.

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

Completeness4/5

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

Complete on the risky parts — workflow, confirmation, modes, recoverability — for a destructive tool with no output schema. Minor gap: it doesn't say what the preview actually returns (match count, sample messages?), which matters since the agent must show it to the user.

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 86%, but the description adds meaning the schema lacks: dryRun is on by default, confirmToken must be the one returned by the preview, and the same arguments must be reused on the second call. The action-to-mode mapping (drafts vs full) is conveyed only here, since the enum itself is unannotated.

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?

States a specific verb and resource ('Archive, mark as read, label, or move to Trash every email matching a search in one account'), which is far beyond restating the name. It never names a sibling, though, so the boundary with modify_emails or search_emails is only implied by the word 'every'/'bulk'.

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 gives an explicit imperative procedure — dryRun=true first, show the preview to the user, then re-call with dryRun=false and the confirmToken — and ties modes to actions. It stops short of saying when to reach for a sibling tool (e.g. modify_emails for targeted single-message edits) instead of a bulk sweep.

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