Skip to main content
Glama
sweetrb

apple-mail-mcp

by sweetrb

get-thread

Retrieve the full email thread for a message ID, oldest-first, to view the entire conversation and context when starting from a single message.

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).

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?

With no annotations, the description carries the full burden and does so well: it discloses the threading algorithm (References/Message-ID for imap: ids, normalized subject otherwise) and the oldest-first ordering, which are non-obvious behavioral traits. It stops short of stating failure modes (e.g. what happens for an unknown id) or any cost/limit behavior beyond the schema's default of 50.

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 front-loaded, labeled blocks (use when / returns / do not use when) with no filler. The Returns parenthetical is dense but every clause conveys information an agent would otherwise have to guess.

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 the Returns summary is bonus rather than a requirement, and the schema fully documents all four parameters. Combined with threading semantics, ordering, and sibling routing, an agent has everything needed to call this correctly on the first attempt.

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: the id's 'imap:' form changes the threading algorithm used, which the schema only hints at with its pattern. It also explains the cross-mailbox/cross-account output behavior that motivates the account and mailbox parameters, though limit is not discussed.

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 first clause states a specific verb and resource ('get-thread' = fetch the whole conversation a message id belongs to) and adds the ordering contract ('oldest-first'). It is explicitly separable from get-message and search-messages, so an agent can pick it without opening any other schema.

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?

Uses explicit 'Use when' and 'Do not use when' blocks, naming the two alternatives (get-message for a single message, search-messages for arbitrary criteria) and the exact condition that selects each. Nothing about routing is left to inference.

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