Skip to main content
Glama
s-morgan-jeffries

apple-mail-mcp

get_messages

Read-onlyIdempotent

Retrieve full message details, including decoded body text, for specified message IDs. Optionally target a specific Mail.app account and mailbox, and choose raw or text body format.

Instructions

Get full details of one or more messages, with bodies.

Returns a list of message dicts (possibly of length 0 or 1). Pair with search_messages (metadata-only) and get_thread (thread member ids) to fetch bodies for specific messages.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
accountNoMail.app account name. Together with ``mailbox``, activates the IMAP fast path for explicit ids: one round-trip lookup instead of an account×mailbox AppleScript scan (issue #72). Ignored for the ``"SELECTED"`` sentinel (selection is global).
mailboxNoFolder to look in for the IMAP fast path (e.g. "INBOX").
body_formatNo``"text"`` (default) returns ``content`` as decoded, human-readable body text only — attachment bytes are stripped (their metadata still appears via ``include_attachments``). This keeps a message carrying a multi-MB attachment from inflating ``content`` into megabytes of inlined base64 that overflow the result. ``"raw"`` restores the legacy IMAP behavior (``content`` is the undecoded MIME body with attachments inlined) — an escape hatch you should rarely need. AppleScript-path content is already plain text and is unaffected by this flag.text
message_idsYesList of message ids to fetch. May include the literal token ``"SELECTED"``, which the server resolves at call time to Mail.app's current UI selection (zero-or-more messages). Mixed lists like ``["SELECTED", "12345"]`` are valid. Empty list is a no-op (returns empty result, no error). Missing ids drop out silently (partial-results convention) — the response contains whatever was found.
headers_onlyNoSkip body fetch on the IMAP path for explicit ids (default: False). Silently ignored on the AppleScript fallback.
include_contentNoInclude message bodies (default: True).
include_attachmentsNoInclude per-attachment metadata (name, mime_type, size, downloaded) on each message (default: True). Bounded cost — id-list cardinality is typically 1-10. Free on the IMAP fast path; cheap-enough on the AppleScript fallback for typical id counts.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.11.0
    • addedInput schema / properties / body_format
      Added value: +{
      +  "default": "text",
      +  "description": "``\"text\"`` (default) returns ``content`` as decoded,\nhuman-readable body text only — attachment bytes are stripped\n(their metadata still appears via ``include_attachments``). This\nkeeps a message carrying a multi-MB attachment from inflating\n``content`` into megabytes of inlined base64 that overflow the\nresult. ``\"raw\"`` restores the legacy IMAP behavior (``content``\nis the undecoded MIME body with attachments inlined) — an escape\nhatch you should rarely need. AppleScript-path content is already\nplain text and is unaffected by this flag.",
      +  "type": "string"
      +}
  2. First observedv0.10.2

TDQS

A4.5/5.0
Behavior4/5

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

The annotations already declare readOnlyHint, idempotentHint, and destructiveHint, so the coverage burden is lower. The description correctly indicates a read operation returning a list, though the phrase 'possibly of length 0 or 1' is slightly ambiguous given the parameter supports multiple message ids.

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?

The description is concise and front-loaded, stating the core purpose and return type in two sentences. It avoids unnecessary detail, leaving parameter specifics to 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?

Given the output schema exists and annotations are present, the description sufficiently covers the tool's purpose, return shape, and relationship to sibling tools. An agent can correctly decide when to invoke this tool without missing critical context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema provides 100% parameter description coverage, so the baseline is met. The description itself adds minimal parameter-level detail beyond saying 'with bodies', but the schema fully documents body_format, message_ids, include_content, and other parameters.

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 clearly states the tool retrieves full message details including bodies, with a verb ('Get') and resource ('messages'). It distinguishes itself from sibling tools by explicitly contrasting with search_messages (metadata-only) and get_thread (thread member ids).

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?

The description explicitly explains how to use this tool in conjunction with search_messages and get_thread to fetch bodies for specific messages. This gives an agent a clear when-to-use scenario and differentiates it from the related sibling tools.

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