Skip to main content
Glama
proton-mail-mcp

proton-mail-mcp

by sethbang

Update message flags

update_message_flags
Idempotent

Add or remove flags such as read, starred, answered, or draft on a Proton Mail message by UID and folder; also accepts user-defined keywords and reports flags the server did not apply.

Instructions

Add or remove flags on an email message. System flags (RFC 3501): \Seen (read), \Flagged (starred), \Answered, \Draft. \Recent is server-managed and \Deleted does not delete on Proton, so both are refused (use delete_message to delete). Flags are case-sensitive and need the backslash; near misses like "Seen" get a correction. User-defined keywords without a backslash prefix are also accepted (alphanumeric + underscore, e.g. "Important", "Custom_Tag"), but Proton Mail Bridge has been observed to silently drop user keywords — any flags the server did not actually apply are reported in the response as "no-op (not applied)".

UID + folder pair caveat: IMAP UIDs are per-folder. The same UID can refer to different messages in different folders — always pair a UID with the folder it came from.

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

Input Schema

NameRequiredDescriptionDefault
uidYesMessage UID
folderNoFolder containing the message (default: INBOX)INBOX
flagsToAddNoFlags to add (e.g. ["\\Seen", "\\Flagged"])
flagsToRemoveNoFlags to remove (e.g. ["\\Seen"])

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. First observedv1.0.1

TDQS

A4.5/5.0
Behavior5/5

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

Annotations only declare idempotent/non-destructive/closed-world; the description adds substantial behavior the agent could not otherwise know: server-managed \Recent, Proton-specific refusal of \Deleted, case-sensitivity with auto-correction of near misses, and Bridge silently dropping user keywords with no-ops reported back. The UID+folder caveat warns about a real cross-folder ambiguity.

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?

Front-loaded with the core action, then layered with flag vocabulary, refusal rules, and caveats in a logical order. It is dense but nearly every clause carries information; the case-sensitivity point is restated twice (backslash requirement and the 'Seen' example) and could be tightened.

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 4-parameter, fully documented mutation tool with no output schema, the definition covers flag formats, refusals, failure reporting, and the UID/folder relationship. What it does not describe is the shape of a successful response (final flag set), which matters slightly given no output schema exists.

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, but the description adds genuine meaning: the valid system-flag set, the backslash requirement, the alphanumeric+underscore rule for user keywords, and the per-folder nature of UIDs that governs how folder must be paired with uid. Only the uid integer bounds are left entirely to the 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 and resource ('Add or remove flags on an email message') and enumerates the exact flag vocabulary in play. It also distinguishes scope from siblings by naming delete_message as the path for deletion and implicitly limiting itself to a single message.

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 when-not guidance: \Recent and \Deleted are refused, and the agent is redirected to delete_message for deletion. It stops short of routing between this tool and bulk_update_flags or flag_thread, so multi-message or thread-level operations are left to inference.

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