Skip to main content
Glama
proton-mail-mcp

proton-mail-mcp

by sethbang

Update labels (bulk)

bulk_update_labels
Idempotent

Add or remove Proton labels on many messages at once using explicit UIDs or search criteria, with an optional dry-run preview before changes.

Instructions

Add or remove Proton labels on many messages in one operation. Provide EITHER uids OR match (XOR), plus at least one of labelsToAdd / labelsToRemove. Labels are given by name or path, as in update_message_labels. Supports dryRun: true for safe preview.

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

Input Schema

NameRequiredDescriptionDefault
uidsNoExplicit UIDs to label, scoped to `folder`. Mutually exclusive with `match` — provide exactly one.
matchNoSearch criteria selecting the messages to label. Mutually exclusive with `uids`.
dryRunNoWhen true, preview the exact UIDs that would be updated without changing any labels.
folderNoSource folder containing the messages (default: INBOX). Messages stay here; labels are additive.INBOX
labelsToAddNoLabels to add, by name or path (e.g. ["Work"] or ["Labels/Work"]); any case. Each label must already exist (create it with create_label). At least one of labelsToAdd/labelsToRemove must be non-empty.
labelsToRemoveNoLabels to remove, by name or path (e.g. ["Work"] or ["Labels/Work"]). Removing a label a message does not carry is a silent no-op.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 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"
    • changedInput schema / properties / labelsToAdd / description
      Previous value: -"Full label paths to add, each starting with `Labels/` (e.g. [\"Labels/Work\"]). Each label must already exist (create it with create_label). At least one of labelsToAdd/labelsToRemove must be non-empty."New value: +"Labels to add, by name or path (e.g. [\"Work\"] or [\"Labels/Work\"]); any case. Each label must already exist (create it with create_label). At least one of labelsToAdd/labelsToRemove must be non-empty."
    • changedInput schema / properties / labelsToRemove / description
      Previous value: -"Full label paths to remove (e.g. [\"Labels/Work\"]). Removing a label a message does not carry is a silent no-op."New value: +"Labels to remove, by name or path (e.g. [\"Work\"] or [\"Labels/Work\"]). Removing a label a message does not carry is a silent no-op."
    • 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 labels."
    • addedInput schema / properties / folder / description
      Added value: +"Source folder containing the messages (default: INBOX). Messages stay here; labels are additive."
    • addedInput schema / properties / labelsToAdd / description
      Added value: +"Full label paths to add, each starting with `Labels/` (e.g. [\"Labels/Work\"]). Each label must already exist (create it with create_label). At least one of labelsToAdd/labelsToRemove must be non-empty."
    • addedInput schema / properties / labelsToRemove / description
      Added value: +"Full label paths to remove (e.g. [\"Labels/Work\"]). Removing a label a message does not carry is a silent no-op."
    • addedInput schema / properties / match / description
      Added value: +"Search criteria selecting the messages to label. Mutually exclusive with `uids`."
    • addedInput schema / properties / uids / description
      Added value: +"Explicit UIDs to label, scoped to `folder`. Mutually exclusive with `match` — provide exactly one."
  3. First observedv1.0.1

TDQS

A4.2/5.0
Behavior4/5

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

Adds real behavior beyond the annotations: `dryRun: true` previews exact UIDs without mutation, labels are additive and messages stay in the source folder, and removing an absent label is a silent no-op. It doesn't state what happens when a label name is unknown (error vs skip) or how many messages the match can affect, which are the remaining behavioral gaps for a bulk mutation.

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?

Four short sentences, front-loaded with the operation, then the key constraints, then the dryRun escape hatch. Nothing is redundant or buried.

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?

Covers the mutual-exclusion rule, the minimum label requirement, folder scoping, and safe-preview behavior, which is most of what a 6-parameter bulk mutation with a nested match object needs. Missing only edge-case behavior (invalid label names, scale limits) and there is no output schema to compensate.

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 coverage is 100%, so every parameter is already documented in the schema, including the XOR rule, label name/path examples, and dryRun semantics. The description largely restates those constraints rather than adding new meaning, so the baseline 3 applies.

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 specific verb and resource ('Add or remove Proton labels') plus the bulk scope ('on many messages in one operation'), which implicitly distinguishes it from the single-message sibling update_message_labels referenced later. An agent can tell what this does without opening the 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 concrete preconditions: XOR between `uids` and `match`, at least one of labelsToAdd/labelsToRemove, labels must already exist (create with create_label), and `folder` defaults to INBOX. It stops short of explicitly contrasting when to prefer this over update_message_labels, though the bulk framing implies the split.

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