Skip to main content
Glama
proton-mail-mcp

proton-mail-mcp

by sethbang

Delete messages (bulk)

bulk_delete
Destructive

Delete multiple Proton Mail messages at once by UID or search match; preview with dryRun, move to Trash by default, or permanently expunge with confirm.

Instructions

Delete multiple messages in one operation. Provide EITHER uids OR match. By default soft-deletes to Trash; pass permanent: true to expunge. permanent: true ALSO requires confirm: true (the expunge is irreversible — there is no Trash to recover from). dryRun: true previews without deleting and needs no confirmation. Proton removes the star (\Flagged) from messages moved to Trash (seen live); star them again after restoring if needed.

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": "bulk_delete"
  }
}

Input Schema

NameRequiredDescriptionDefault
uidsNoExplicit UIDs to delete, scoped to `folder`. Mutually exclusive with `match`. For destructive cleanup, explicit UIDs are safer than a content match (which can lag).
matchNoSearch criteria selecting messages to delete. Mutually exclusive with `uids`. Prefer from:/date filters over subject/body (Proton's content index lags ~30–60s, so a subject/body match can silently miss recent mail).
dryRunNoWhen true, preview the exact UIDs that would be deleted without deleting anything (no confirm needed). Recommended before any match-based run.
folderNoFolder containing the messages (default: INBOX).INBOX
confirmNoRequired to be true when permanent is true. Acknowledges the expunge is irreversible.
permanentNoIf true, permanently expunge instead of moving to Trash. Requires confirm: true.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv2.0.1
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedInput schema / properties / match / properties / larger / exclusiveMinimum
      Added value: +0
    • removedInput schema / properties / match / properties / larger / minimum
      Removed value: --9007199254740991
    • addedInput schema / properties / match / properties / smaller / exclusiveMinimum
      Added value: +0
    • removedInput schema / properties / match / properties / smaller / minimum
      Removed value: --9007199254740991
  2. Changed4 schema fields changedv1.0.2
    • addedInput schema / properties / dryRun / description
      Added value: +"When true, preview the exact UIDs that would be deleted without deleting anything (no confirm needed). Recommended before any match-based run."
    • changedInput schema / properties / folder / description
      Previous value: -"Source folder (default: INBOX)"New value: +"Folder containing the messages (default: INBOX)."
    • addedInput schema / properties / match / description
      Added value: +"Search criteria selecting messages to delete. Mutually exclusive with `uids`. Prefer from:/date filters over subject/body (Proton's content index lags ~30–60s, so a subject/body match can silently miss recent mail)."
    • addedInput schema / properties / uids / description
      Added value: +"Explicit UIDs to delete, scoped to `folder`. Mutually exclusive with `match`. For destructive cleanup, explicit UIDs are safer than a content match (which can lag)."
  3. First observedv1.0.1

TDQS

A4.4/5.0
Behavior5/5

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

Annotations only say destructiveHint=true; the description goes much further by explaining the soft-delete-to-Trash default, that expunge is irreversible with no Trash recovery, that confirm is a hard gate, and that dryRun bypasses confirmation. The Proton star-flag side effect is exactly the kind of non-obvious behavior an agent could not infer from structured fields.

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?

Front-loaded with the core action, then the parameter contract, then the safety gates, then an edge-case caveat. Every sentence carries operational information with no filler.

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?

For a destructive, unauthenticated-looking bulk mutation this covers irreversibility, confirmation, preview, and selection mode thoroughly. The remaining gap is that with no output schema the description never says what a call returns (e.g., affected UID count), leaving the agent to guess at the result shape.

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% and the schema already documents the uids/match exclusivity, the confirm requirement, and dryRun semantics, so the description largely restates structured data. It usefully summarizes the confirm/permanent coupling in one place, but adds little beyond the schema's own text.

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?

Opens with a specific verb and resource plus the bulk scope ('Delete multiple messages in one operation'), which is exactly what separates it from the single-message siblings like delete_message and delete_thread. An agent knows immediately this is the multi-message path.

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?

Gives clear mode selection: 'Provide EITHER `uids` OR `match`', soft-delete by default, `permanent: true` for expunge, `dryRun: true` to preview. It does not explicitly name an alternative tool or state when to fall back to delete_message for a single message, so it stops short of full when/when-not routing.

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