Skip to main content
Glama
proton-mail-mcp

proton-mail-mcp

by sethbang

Update message labels

update_message_labels
Idempotent

Add or remove Proton labels on a message by name or path while keeping it in its source folder; adding a missing label fails until it is created.

Instructions

Add or remove Proton labels on a message. Labels live under the "Labels/" namespace and are additive — the message stays in its source folder while gaining or losing label tags. Name labels in labelsToAdd / labelsToRemove by name or path, any case (e.g. ["Important", "Labels/Work"]).

Adds are strict: copying to a missing label throws "Label not found" (create it first with create_label). Removes are idempotent: removing a label that doesn't apply, or doesn't exist as a mailbox, is a silent no-op.

UID + folder pair caveat: IMAP UIDs are per-folder. Pair the UID with the folder it came from; the same UID can refer to different messages elsewhere.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "uid": "<uid>"
    },
    "name": "update_message_labels"
  }
}

Input Schema

NameRequiredDescriptionDefault
uidYesMessage UID in the source folder
folderNoSource folder containing the message (default: INBOX)INBOX
labelsToAddNoLabels to add, by name or path (e.g. ["Important"] or ["Labels/Important"]); any case.
labelsToRemoveNoLabels to remove, by name or path (e.g. ["Important"] or ["Labels/Important"]).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 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 (e.g. [\"Labels/Important\"])"New value: +"Labels to add, by name or path (e.g. [\"Important\"] or [\"Labels/Important\"]); any case."
    • changedInput schema / properties / labelsToRemove / description
      Previous value: -"Full label paths to remove (e.g. [\"Labels/Important\"])"New value: +"Labels to remove, by name or path (e.g. [\"Important\"] or [\"Labels/Important\"])."
  2. First observedv1.0.1

TDQS

A4.3/5.0
Behavior5/5

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

Annotations already declare non-readOnly, non-destructive, idempotent, but the description adds real behavioral detail beyond them: labels are additive and the message stays in its source folder, adds throw 'Label not found' while removes are silent no-ops, and the UID is only meaningful paired with its source folder. The IMAP UID-per-folder caveat is exactly the kind of non-obvious trait structured fields cannot convey.

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-loads the core action in one sentence, then layers the add/remove asymmetry and the UID caveat in short, clearly separated blocks. Every sentence carries distinct operational information; nothing is restated from the schema or annotations.

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?

With no output schema, the description should ideally say what a successful call returns (e.g. updated label set or empty response), which it omits. Otherwise it covers the complexity well: mutation semantics, failure modes, idempotency, and the folder/UID pairing hazard are all addressed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3; the description earns above that by explaining that labels may be given by name or path in any case and by tying `uid` semantics to `folder` via the UID-per-folder caveat, which the schema only hints at. The add/remove asymmetry (strict vs idempotent) attaches meaning to `labelsToAdd` versus `labelsToRemove` that the schema does not.

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?

States a specific verb pair and resource: 'Add or remove Proton labels on a message.', which is unambiguous against siblings like update_message_flags (flags vs labels) and create_label (named as the prerequisite for missing labels). It doesn't explicitly contrast with bulk_update_labels, leaving the single-vs-many distinction implied by 'on a message' rather than stated.

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 operational guidance: adds are strict and require the label to exist first, routing the agent to `create_label`; removes are silent no-ops. What's missing is an explicit statement of when to prefer this over bulk_update_labels for multiple messages, so the alternative routing is only partial.

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