Skip to main content
Glama
proton-mail-mcp

proton-mail-mcp

by sethbang

Get thread

get_thread
Read-onlyIdempotent

Retrieve every message in an email conversation thread, sorted oldest first, by following In-Reply-To and References headers; prefer a Message-ID to search across folders.

Instructions

Get all messages in a conversation thread by walking In-Reply-To and References headers. Returns messages sorted chronologically (oldest first).

PREFERRED: pass messageId — Message-IDs are globally unique, so this sidesteps the UID-collision footgun and walks INBOX + Sent + All Mail by default to catch replies that span folders. A thread member that lives in a user folder (e.g. Folders/Development) and surfaces only via the All Mail virtual copy is rewritten to its real storage folder AND UID, so the returned folder/uid pair is safe to feed into a single-folder tool.

Legacy: passing uid + folder searches only within that folder. UIDs are per-folder in IMAP, so the same UID in two folders refers to different messages — use messageId when possible.

SCOPE: this walks the reply chain only. Forwards do NOT set In-Reply-To/References back to the original, so a forwarded copy starts its own conversation and will NOT appear here — get_thread is the reply chain, not every message derived from the original.

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": "get_thread"
  }
}

Input Schema

NameRequiredDescriptionDefault
uidNoUID of a thread message (only used when messageId is omitted; folder-scoped)
limitNoMaximum messages to return (default: 25, max: 50)
folderNoFolder the UID lives in (ignored when messageId is set)INBOX
foldersNoOverride the default folder walk when messageId is set (default: INBOX, Sent, All Mail)
messageIdNoRFC 5322 Message-ID of any message in the thread (e.g. <abc@example.com>). Preferred over uid+folder.

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.6/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, and closed-world, yet the description still adds real behavior: default folder walk of INBOX + Sent + All Mail, and the rewriting of All Mail virtual copies to real storage folder/UID so results are safe to feed into single-folder tools. It stops short of describing pagination or behavior when the thread is truncated by limit, which keeps it below a 5.

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?

Well structured with labeled PREFERRED / Legacy / SCOPE sections and the preferred path front-loaded. It is longer than strictly necessary — the UID-collision explanation is repeated in two places — but no sentence is filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Covers selection strategy, defaults, sorting, folder-resolution side effects, and the forward-email scope gap, which is everything an agent needs to call this correctly. No output schema exists, but the returned folder/uid pair semantics are explained inline.

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 baseline is 3, but the description adds meaningful semantics beyond the schema: the rationale for preferring messageId, the mutual exclusivity of messageId vs uid/folder, and the default folder-walk that folders overrides. It does not clarify how limit interacts with thread traversal (e.g., truncation direction).

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 ('Get all messages in a conversation thread') and the mechanism used ('walking In-Reply-To and References headers'), which makes it clearly distinct from read_message or list_messages. The chronological sort order is also stated up front.

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?

Explicitly recommends the messageId path over uid+folder and explains why (globally unique vs IMAP per-folder UID collisions). It also defines the negative scope: forwards don't set In-Reply-To/References, so they will NOT appear here — a genuine when-not statement.

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