Skip to main content
Glama
LeChabrax

Apple Mail MCP Server

by LeChabrax

update_message

DestructiveIdempotent

Change read status, flag, and destination mailbox for multiple Apple Mail messages in a single atomic call, using patch semantics to alter only the attributes you specify.

Instructions

Update one or more messages: change read state, flag, and/or move, in one atomic call (#135).

Patch semantics — caller specifies only the fields to change. All specified mutations apply in a single AppleScript pass via the bulk-update helper. Replaces the previous mark_as_read, move_messages, and flag_message tools.

Order of operations (matters for IMAP): read-state and flag changes apply first (in source mailbox), then the move. IMAP requires the message to exist in the source folder for STORE before MOVE.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
accountNoAccount name or UUID hosting the destination mailbox. Required when `destination_mailbox` is set; also used with `source_mailbox` for narrow-path optimization.
flaggedNoTrue to flag (default red if no `flag_color` set), False to clear the flag, None to leave unchanged.
flag_colorNoColor name (orange, red, yellow, blue, green, purple, gray, none). Implies `flagged=True` unless "none". Validated against the existing flag-color schema.
gmail_modeNo**Deprecated and ignored (#364).** Previously selected a copy+delete strategy that silently routed Gmail moves through Trash and lost the message. The move strategy is now chosen automatically (IMAP relabel when configured; otherwise a verified AppleScript move). A Gmail label move that can't be confirmed returns `error_type: "imap_required"` — configure IMAP with `apple-mail-mcp setup-imap --account <name>`. Slated for removal at v1.0.
message_idsYesList of message IDs to update.
read_statusNoTrue to mark as read, False to mark as unread, None to leave unchanged.
source_mailboxNoSource mailbox name. With `account`, narrows the AppleScript scan to one mailbox (O(N) instead of cross-scan). Required for reliable Gmail moves (the move is verified against the source).
destination_mailboxNoMove messages here (requires `account`).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

Annotations already cover destructiveHint and idempotentHint, so the description adds supplementary operational detail: atomicity, patch semantics (only specified fields change), order of operations (read/flag before move), and the IMAP requirement for STORE before MOVE. No contradiction with annotations.

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 sentences, each dense with distinct information: primary action, patch semantics, and ordering/IMAP caveat. No filler, front-loaded with the core purpose, and easy to scan.

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 (covering return value), the description addresses the key behavioral aspects: atomicity, patch semantics, ordering for IMAP, and the replacement of old tools. Combined with the highly detailed schema and annotations, an agent has everything needed to invoke the tool correctly.

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 covers all 8 parameters at 100%, so the baseline is 3. The description goes beyond the schema by clarifying that specified fields are treated as patch updates (None leaves unchanged, implicitly) and that move operations depend on source/destination mailbox ordering. This adds meaningful context for parameter usage.

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?

States a specific verb (update), resource (messages), and enumerates the three action types (read state, flag, move). Explicitly differentiates from its predecessors mark_as_read, move_messages, and flag_message, and by its name stands apart from delete_messages. An agent can immediately know what it does and how it differs.

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?

Clearly tells the agent to use this in place of the three older tools, and explains the patch semantics and atomic call. It also specifies the ordering constraint for IMAP. It does not explicitly call out exclusions like 'use delete_messages for deletion', but the verb distinction and naming make that inference straightforward.

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