Skip to main content
Glama
MarcinWalendowski

AnyMail MCP

Bulk permanent delete

bulk_delete
Destructive

Permanently delete all messages matching a search query within a specific mailbox. Requires confirmation to prevent accidental loss; use dry run to preview first.

Instructions

PERMANENTLY delete every message matching a query in an explicit mailbox. On Gmail this only works inside Trash or Spam (use empty_trash / empty_spam, or bulk_trash then empty_trash). Irreversible; requires confirm:true (dryRun:true to preview).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
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.
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).
Behavior4/5

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

Annotations already declare destructiveHint:true. The description adds that the action is irreversible, requires confirm:true, and notes Gmail-specific restrictions, which provides useful behavioral context beyond the annotation.

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?

Two sentences, front-loaded with key action and warning, every word earns its place, no waste.

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?

Given the complexity (6 params, destructive, no output schema), the description covers Gmail specifics, preview, confirmation, and alternatives. It lacks return value details, but the absence of output schema reduces the need. Overall fairly complete.

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 is 3. The description emphasizes the roles of confirm and dryRun, but adds little other semantic value beyond what the schema already provides.

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 explicitly states 'PERMANENTLY delete every message matching a query in an explicit mailbox' with a specific verb and resource, and differentiates from sibling tools by noting Gmail-specific restrictions and alternatives like empty_trash/empty_spam.

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

Usage Guidelines5/5

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

The description provides clear when-to-use guidance (for permanent deletion) and when-not (only in Trash/Spam on Gmail), mentions dryRun:true for preview and confirm:true for execution, and references alternative tools for emptying trash/spam.

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