Skip to main content
Glama
LeChabrax

Apple Mail MCP Server

by LeChabrax

get_messages

Read-onlyIdempotent

Retrieve full email message details and bodies by IDs or selected messages, including attachments and headers as needed, for targeted access in Apple Mail.

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

Behavior5/5

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

Very thorough. It explains the no-op behavior for empty lists, silent dropping of missing ids (partial-results), the "SELECTED" sentinel resolution, and the IMAP fast-path vs AppleScript fallback tradeoffs. The return type is described as a list of message dicts. The annotations (readOnlyHint=true, destructiveHint=false) reinforce that this is a safe read, and the description even covers optional-parameter side effects like headers_only being ignored on the fallback. This is exactly the kind of behavioral disclosure an agent needs.

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?

The description is efficient but loses a point for leaning heavily on the schema and a code reference. It states purpose, scope, and relationships to siblings in two sentences. Adjective: compact, though the schema carries much of the behavioral detail. Not verbose enough to be a 5.

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?

Everything an agent needs is present: return format (list of dicts), edge cases (missing ids, empty list, SELECTED sentinel), and fallback behavior. Sibling routing is handled. The output schema understands what comes back. This is complete for a read tool.

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%, and the schema descriptions are unusually detailed. The 'account' and 'mailbox' parameters get extra context (IMAP fast path semantics) that is not directly inferable from the schema, which adds real value. However, the description text itself doesn't reiterate parameter details — it relies on the schema doing the heavy lifting. A 4 acknowledges the added value from the IMAP fast-path context in the schema, while not being a 5 since the description doesn't extend parameter semantics beyond 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 ('fetch'), resource ('one or more messages'), and scope ('with bodies'). It also explicitly names the sibling tools it is not — search_messages (metadata-only) and get_thread (thread member ids) — so an agent can distinguish them without opening other schemas.

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?

Names the alternatives to pair with (search_messages and get_thread) and the condition for picking those, which routes the agent. It doesn't state when to use this tool over the IMAP fast path vs fallback, but the parameter docs carry that context, and the pairing tip is the key usage decision.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/LeChabrax/apple-mail-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server