Skip to main content
Glama
codefuturist

Email MCP Server

by codefuturist

Get thread

get_thread
Read-only

Reconstruct a full email conversation thread by following References and In-Reply-To headers, returning all related messages without marking them as seen. Use get_email first for the message_id.

Instructions

Reconstruct a full email conversation thread by following References and In-Reply-To headers. Returns all related messages. Does NOT mark emails as seen. format: text (default) = HTML converted to readable text with markdown; stripped = text minus quoted replies; full = raw body part. Each body is capped at 5000 chars by default — pass maxLength (0 = unlimited) to change. Use newestFirst=true to show the most recent message in full and older messages as header-only summaries. Use get_email first to obtain the message_id. Each message carries a Bulk line when it is list or machine-generated mail.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
formatNoBody format: text=readable text with markdown links (default), stripped=text without quoted replies or signatures, full=raw body parttext
accountYesAccount name from list_accounts
mailboxNoMailbox to search (default: INBOX)INBOX
maxLengthNoTruncate each message body at this many characters (default 5000; 0 = unlimited). A hint shows how many characters remain.
message_idYesMessage-ID header value (from get_email)
newestFirstNoWhen true, shows the newest message in full and older messages as header-only summaries. Ideal for AI triage of long threads where only the latest reply matters.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv0.6.0
    • 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 / format / default
      Previous value: -"full"New value: +"text"
    • changedInput schema / properties / format / description
      Previous value: -"Body format: full=raw (default), text=plain text (strips HTML), stripped=plain text without quoted replies or signatures"New value: +"Body format: text=readable text with markdown links (default), stripped=text without quoted replies or signatures, full=raw body part"
    • addedInput schema / properties / maxLength / default
      Added value: +5000
    • changedInput schema / properties / maxLength / description
      Previous value: -"Truncate each message body at this many characters. A hint shows how many characters remain."New value: +"Truncate each message body at this many characters (default 5000; 0 = unlimited). A hint shows how many characters remain."
    • changedInput schema / properties / maxLength / minimum
      Previous value: -100New value: +0
  2. First observedv0.2.3

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, and the description adds genuinely non-obvious behavior on top: 'Does NOT mark emails as seen,' per-body truncation at 5000 chars with a remaining-character hint, and a Bulk line flagging list/machine-generated mail. That is real behavioral context beyond the structured fields.

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?

It is dense but front-loaded: purpose first, then the non-mutation guarantee, then format/limit/ordering semantics, then the prerequisite. Every sentence carries information, though the format explanation is packed tightly enough that a reader must parse carefully.

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?

With no output schema and six parameters, the description still covers what comes back (all related messages, truncated bodies, Bulk annotations) and the ordering/format knobs an agent needs. Nothing required to invoke it correctly is missing.

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 goes further: it clarifies that 'text' converts HTML with markdown links, that stripped removes quoted replies, that maxLength 0 means unlimited, and exactly how newestFirst alters per-message rendering. Only mailbox semantics 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?

The description states a specific verb and resource ('Reconstruct a full email conversation thread') plus the mechanism (following References and In-Reply-To headers), which is unique among siblings like get_email and get_emails. An agent can distinguish this thread-reconstruction tool from single-message fetchers without opening any 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?

It gives an explicit prerequisite ('Use get_email first to obtain the message_id') and a situational cue for newestFirst ('Ideal for AI triage of long threads'). It does not explicitly state when to prefer get_email or get_emails over this tool, so it stops short of full alternative routing.

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