Skip to main content
Glama
proton-mail-mcp

proton-mail-mcp

by sethbang

Flag thread

flag_thread
Idempotent

Add or remove flags on every message in a thread identified by any Message-ID, applying changes to the whole conversation or previewing them with a dry run.

Instructions

Add or remove flags on every message in a thread, identified by Message-ID. Use this instead of update_message_flags when you want the change applied to a whole conversation, or bulk_update_flags when you have a flat set of UIDs rather than a thread. At least one of flagsToAdd/flagsToRemove must be non-empty. acrossFolders:false by default. dryRun:true previews.

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": {
      "messageId": "<messageId>"
    },
    "name": "flag_thread"
  }
}

Input Schema

NameRequiredDescriptionDefault
dryRunNoWhen true, preview which messages would be updated (per folder) without changing any flags.
messageIdYesRFC 5322 Message-ID of any message in the thread (e.g. `<abc@example.com>`); the whole reply chain is resolved from it.
flagsToAddNoFlags to add to every message in the thread. System flags include the backslash (e.g. ["\\Seen", "\\Flagged"]); user keywords are bare alphanumerics (e.g. ["Important"]). At least one of flagsToAdd/flagsToRemove must be non-empty.
acrossFoldersNoWhen false (default), act only within the seed message's folder. When true, walk INBOX + Sent + All Mail so the flag change covers thread members in other folders.
flagsToRemoveNoFlags to remove from every message in the thread (e.g. ["\\Seen"] to mark the whole thread unread, or ["\\Flagged"] to unstar).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field 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"
  2. Changed5 schema fields changedv1.0.2
    • addedInput schema / properties / acrossFolders / description
      Added value: +"When false (default), act only within the seed message's folder. When true, walk INBOX + Sent + All Mail so the flag change covers thread members in other folders."
    • addedInput schema / properties / dryRun / description
      Added value: +"When true, preview which messages would be updated (per folder) without changing any flags."
    • addedInput schema / properties / flagsToAdd / description
      Added value: +"Flags to add to every message in the thread. System flags include the backslash (e.g. [\"\\\\Seen\", \"\\\\Flagged\"]); user keywords are bare alphanumerics (e.g. [\"Important\"]). At least one of flagsToAdd/flagsToRemove must be non-empty."
    • addedInput schema / properties / flagsToRemove / description
      Added value: +"Flags to remove from every message in the thread (e.g. [\"\\\\Seen\"] to mark the whole thread unread, or [\"\\\\Flagged\"] to unstar)."
    • addedInput schema / properties / messageId / description
      Added value: +"RFC 5322 Message-ID of any message in the thread (e.g. `<abc@example.com>`); the whole reply chain is resolved from it."
  3. First observedv1.0.1

TDQS

A4.1/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, idempotentHint=true and destructiveHint=false, so the safety profile is covered. The description adds the thread-resolution behavior and the non-empty-flags constraint, but its notes on acrossFolders and dryRun merely restate schema defaults, and nothing is said about permission requirements or what a removal of \Seen does to read state across folders.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Four short sentences, front-loaded with the core action before alternatives and constraints; nothing is padded. The final two sentences duplicate schema defaults, which is mildly wasteful but keeps the definition self-contained.

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 five-parameter mutation tool with no output schema, the definition covers scope, prerequisites and the dryRun preview path adequately. It stops short of saying what a successful call returns (e.g. per-folder counts) and what happens when the Message-ID resolves to nothing, which would round it out.

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 messageId, flagsToAdd, flagsToRemove, acrossFolders and dryRun are already documented with examples and defaults. The description adds no syntax, format, or edge-case meaning beyond repeating the two defaults, which is the baseline case for a fully documented schema.

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 pair (add/remove flags) and an unambiguous resource (every message in a thread resolved from a Message-ID). It explicitly distinguishes itself from update_message_flags and bulk_update_flags, so an agent can route correctly without inspecting sibling schemas.

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?

Gives explicit when-to-use-this routing: whole conversation vs. update_message_flags, and flat UID sets vs. bulk_update_flags. The one hard precondition (at least one of flagsToAdd/flagsToRemove must be non-empty) is also stated up front, leaving little to infer.

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