Skip to main content
Glama
MarcinWalendowski

AnyMail MCP

Bulk modify labels

bulk_modify_labels

Apply label changes to Gmail messages by search query. Preview results via dry-run, then confirm to execute in batches.

Instructions

Add and/or remove labels on every message matching a query (Gmail only). Provide add and/or remove. dryRun:true previews; confirm:true runs batches over 100.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
addNoLabels to add.
maxNoCap on messages acted on this call for trash/move/delete/empty (default 2000, keeps calls under the timeout). If the result is done:false, re-run the same call (with confirm:true) to continue until done:true.
queryNoWhat to match. On Gmail this is native search syntax (e.g. 'older_than:1y is:unread'); on other providers a text match. Omit to match the whole mailbox.
dryRunNoPreview only: return the matched count + a small sample, changing nothing.
removeNoLabels to remove.
accountNoGmail address to act on. Omit to use the default account.
confirmNoRequired to actually run a destructive or large (>100) batch.
mailboxNoMailbox/label to run in (e.g. '[Gmail]/Spam'). Omit for the account's whole-mail scope (Gmail: All Mail).
Behavior3/5

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

No annotations, so description carries full burden. It discloses dryRun preview and confirm requirement for large batches, but does not mention potential issues like rate limits, timeouts, or that it modifies many messages. Modest transparency.

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?

Extremely concise two-sentence description. Front-loads the purpose and action. No wasted words.

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

Completeness2/5

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

Despite 8 parameters and no output schema, the description is very short. It omits details about the 'max' parameter's re-run behavior, result handling, and asynchronous nature. Leaves gaps for the agent.

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 baseline 3. The description adds minimal value beyond schema: it restates 'provide add and/or remove' and clarifies dryRun/confirm behavior, but most parameter details are already in 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 clearly states the tool adds/removes labels on every message matching a query, specifying it is Gmail only. It distinguishes from sibling 'modify_labels' by indicating bulk operation, but does not explicitly contrast with other bulk tools.

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

Usage Guidelines3/5

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

The description provides guidance on using dryRun for preview and confirm for large batches, but lacks explicit when-not-to-use or alternatives. Implied usage from 'every message matching a query' is present.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/MarcinWalendowski/anymail-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server