Skip to main content
Glama
apple-mail-mcp

apple-mail-mcp

by sweetrb

get-thread

Read-only

Retrieve the full email thread for a given message ID, ordered oldest-first, grouping by headers or normalized subject so you can view the whole conversation.

Instructions

Use when: you have one message id and want the whole conversation it belongs to, oldest-first. With an imap: id it threads by References/Message-ID; otherwise it groups by normalized subject. Returns: the thread's normalized subject and its messages (id, date, subject, sender, read state, mailbox and account; each text line names its mailbox and account when the messages can come from more than one). Do not use when: you only need the single message (use get-message) or are searching by arbitrary criteria (use search-messages).

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": {
      "id": "<id>"
    },
    "name": "get-thread"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesA message ID in the conversation (numeric or imap:…)
limitNoMax messages in the thread (default 50)
accountNoAccount to search (omit to search all)
mailboxNoMailbox to search (omit to search all)

Output Schema

NameRequiredDescriptionDefault
countNo
partialNo
subjectNo
messagesNo
failedMailboxesNo
omittedMessagesNo
failedMailboxReasonsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv2.20.29
    • addedOutput schema / properties / failedMailboxReasons / propertyNames
      Added value: +{
      +  "type": "string"
      +}
  2. Changed2 schema fields changedv2.19.19
    • addedOutput schema / properties / failedMailboxReasons
      Added value: +{
      +  "additionalProperties": {
      +    "type": "string"
      +  },
      +  "type": "object"
      +}
    • addedOutput schema / properties / omittedMessages
      Added value: +{
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "id": {
      +        "type": "string"
      +      },
      +      "mailbox": {
      +        "type": "string"
      +      },
      +      "reason": {
      +        "type": "string"
      +      },
      +      "uid": {
      +        "type": "number"
      +      }
      +    },
      +    "required": [
      +      "id",
      +      "mailbox",
      +      "uid",
      +      "reason"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
  3. Changed1 schema field changedv2.17.2
    • addedOutput schema / properties / failedMailboxes
      Added value: +{
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
  4. Changed2 schema fields changedv2.10.24
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  5. Changed1 schema field changedv2.10.8
    • changedOutput schema / additionalProperties
      Previous value: -falseNew value: +true
  6. Addedv2.8.14
  7. Removedv2.8.10
  8. First observedv2.6.1

TDQS

A4.7/5.0
Behavior4/5

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

Annotations only declare readOnlyHint and openWorldHint=false; the description goes further by disclosing the threading algorithm (References/Message-ID for imap: ids, normalized-subject grouping otherwise), the result ordering, and the returned fields including mailbox/account qualification. Minor gap: no note on pagination or what happens if the thread exceeds the limit.

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?

Three labeled blocks (Use when / Returns / Do not use when) with the trigger condition front-loaded. Every sentence carries information; nothing is redundant with the schema.

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?

An output schema exists so return values need not be exhaustively described, yet the description still summarizes the returned thread shape. For a 4-parameter read tool with full schema coverage and annotations, nothing an agent needs to call 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 adds real meaning beyond the schema: the id's format (imap: vs numeric) changes the threading strategy, which the schema's pattern alone does not convey. The limit/account/mailbox parameters are left 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 names a specific verb and resource ('get-thread' returning 'the whole conversation a message belongs to') and states the ordering (oldest-first) plus the threading key. It also explicitly contrasts with get-message and search-messages, so an agent can select it without opening 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?

Explicit 'Use when' and 'Do not use when' clauses, each naming the concrete alternative tool (get-message for a single message, search-messages for arbitrary-criteria search). The triggering condition (you have one message id) is stated up front.

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