Skip to main content
Glama
wylieswanson

apple-mail-mcp-server

by wylieswanson

update_message

DestructiveIdempotent

Update one or more messages by changing read state, flag, or moving them in a single atomic call. Specify only the fields to change.

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-fast-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 indicate idempotent (true) and destructive (true). The description adds atomic behavior, patch semantics, and real-world IMAP order constraints (read/flag before move). It also explains deprecated gmail_mode. This goes beyond annotations, providing valuable behavioral context.

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, front-loaded with the core purpose, and each sentence adds value. It efficiently covers atomicity, replacement of old tools, and IMAP considerations without redundancy.

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 complexity (8 parameters, output schema present), the description covers purpose, usage context, behavioral details, deprecation, and order of operations. The output schema handles return values, making the description complete for effective tool selection and invocation.

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?

Schema coverage is 100% with detailed parameter descriptions. The tool description adds overall context (atomic, patch semantics) but does not significantly enhance individual parameter meaning beyond what the schema already provides. Baseline 3 is appropriate.

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 it updates messages by changing read state, flag, and/or move, all in one atomic call. It specifies the resource (messages) and actions, and distinguishes from siblings like delete_messages by focusing on update operations.

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?

The description explicitly says it replaces previous separate tools (mark_as_read, move_messages, flag_message) and provides order-of-operations guidance for IMAP. It lacks an explicit statement of when not to use it, but provides sufficient context for typical use.

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/wylieswanson/apple-mail-pz-mcp'

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