Skip to main content
Glama
proton-mail-mcp

proton-mail-mcp

by sethbang

Update flags (bulk)

bulk_update_flags
Idempotent

Add or remove flags on multiple Proton Mail messages at once by UID list or search criteria, with an optional dry run to preview affected messages.

Instructions

Add or remove flags on multiple messages in one operation. Provide EITHER uids OR match, plus at least one of flagsToAdd / flagsToRemove. Same flag whitelist as update_message_flags.

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_update_flags"
  }
}

Input Schema

NameRequiredDescriptionDefault
uidsNoExplicit UIDs to update, scoped to `folder`. Mutually exclusive with `match` — provide exactly one.
matchNoSearch criteria selecting the messages to update (same fields as search_messages). Mutually exclusive with `uids`.
dryRunNoWhen true, preview the exact UIDs that would be updated without changing any flags. Run this first for match-based selections.
folderNoFolder containing the messages (default: INBOX).INBOX
flagsToAddNoFlags to add across all selected messages. System flags include the backslash (e.g. ["\\Seen"]); user keywords are bare (e.g. ["Important"]). At least one of flagsToAdd/flagsToRemove must be non-empty.
flagsToRemoveNoFlags to remove across all selected messages (e.g. ["\\Seen"] to mark unread).

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. Changed6 schema fields changedv1.0.2
    • addedInput schema / properties / dryRun / description
      Added value: +"When true, preview the exact UIDs that would be updated without changing any flags. Run this first for match-based selections."
    • addedInput schema / properties / flagsToAdd / description
      Added value: +"Flags to add across all selected messages. System flags include the backslash (e.g. [\"\\\\Seen\"]); user keywords are bare (e.g. [\"Important\"]). At least one of flagsToAdd/flagsToRemove must be non-empty."
    • addedInput schema / properties / flagsToRemove / description
      Added value: +"Flags to remove across all selected messages (e.g. [\"\\\\Seen\"] to mark unread)."
    • addedInput schema / properties / folder / description
      Added value: +"Folder containing the messages (default: INBOX)."
    • addedInput schema / properties / match / description
      Added value: +"Search criteria selecting the messages to update (same fields as search_messages). Mutually exclusive with `uids`."
    • addedInput schema / properties / uids / description
      Added value: +"Explicit UIDs to update, scoped to `folder`. Mutually exclusive with `match` — provide exactly one."
  3. First observedv1.0.1

TDQS

A4/5.0
Behavior3/5

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

Annotations already declare readOnly=false, idempotent=true, destructive=false, so the safety profile is covered. The description adds the selection-mode exclusivity and the at-least-one-flag precondition, but says nothing beyond the structured fields about atomicity, partial failures on a mixed UID set, or invalid-flag rejection. Since those constraints are also fully spelled out in the schema, the added behavioral value is modest.

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 short sentences with the operation first and the parameter contract second; every clause carries a constraint the caller must satisfy, with no filler or restatement of the name.

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 6-parameter, nested-object bulk mutation with no output schema, the description covers the two risky decisions (how messages are selected, and that at least one flag direction is required). Remaining gaps — what the response contains and whether the update is all-or-nothing across matched messages — are minor given the 100% schema coverage and the presence of annotations.

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%, including detailed notes on the nested `match` criteria, `dryRun` previewing, and flag syntax with backslash prefixes, so the baseline is 3. The description restates the uids/match exclusivity and the flag requirement rather than adding syntax or format detail beyond the schema; the only extra signal is the whitelist equivalence to update_message_flags, which implies validation behavior.

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?

States a concrete verb and resource ('Add or remove flags') plus the scope that distinguishes it ('on multiple messages in one operation'), and names the sibling update_message_flags as the shared-whitelist counterpart. An agent can tell this apart from update_message_flags and bulk_update_labels without opening any schema.

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 explicit invocation constraints: 'Provide EITHER `uids` OR `match`, plus at least one of `flagsToAdd` / `flagsToRemove`', plus the cross-reference that the flag whitelist matches update_message_flags. It does not explicitly say when to pick this over the single-message sibling or when to prefer match over uids, so routing is implied rather than stated.

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