Skip to main content
Glama
wylieswanson

apple-mail-mcp-server

by wylieswanson

update_draft

DestructiveIdempotent

Update an existing draft in Apple Mail by merging new fields into a replacement draft, preserving threading and attachments.

Instructions

Update an existing draft. Implemented as delete-and-recreate.

Returns a NEW draft_id — Mail.app forbids mutating saved drafts, so update is implemented by reading the draft's current state, deleting it, and creating a new draft with the merged fields. Threading headers (for reply seeds) and forward anchor are preserved via persisted seed metadata.

Field merge semantics: any non-None argument overrides the existing value. None keeps the existing value. attachment_paths=None PRESERVES existing attachments (extracted via Mail's save command); [] explicitly clears them; a list replaces.

For drafts created externally (not via create_draft), seed recovery falls back to scanning Mail.app for the In-Reply-To header — this can be slow on large mailboxes (~30s+ per call). Forward seeds without disk state are misclassified as fresh; pass an explicit body if so.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ccNo
toNo
bccNo
bodyNoOverride body. None keeps existing. Non-None replaces (including the empty string, which clears).
subjectNoOverride subject. None keeps existing.
draft_idYesMail.app id of the existing draft.
send_nowNo``False`` (default) saves new draft. ``True`` sends after eliciting confirmation.
body_htmlNoOptional HTML body for the recreated draft (see ``create_draft``). Requires IMAP credentials and is limited to drafts whose seed is a fresh draft (not reply/forward) and to ``send_now=False``. NOTE: because the draft is recreated and draft state captures only plain text, an existing HTML draft is NOT preserved across an update unless ``body_html`` is passed again. (#251)
from_accountNoOverride sender.
template_nameNo
template_varsNo
attachment_pathsNoOverride attachments. None preserves existing via temp-dir extraction; [] clears; list replaces.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

Beyond annotations (destructive, idempotent), the description reveals the delete-and-recreate implementation, new draft_id return, seed preservation, attachment handling, and limitations with external drafts. This is highly transparent.

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 well-structured with key facts upfront, then detailed semantics. It is slightly verbose but every sentence adds important information, balancing completeness and readability.

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 tool's complexity (destructive, idempotent, 12 parameters, behavioral nuances), the description covers critical aspects: new ID, merge rules, attachment handling, external draft performance, and HTML limitations. The output schema likely covers return values, making it complete.

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?

The schema covers 58% of parameters with descriptions, and the description adds global merge semantics and specific behavior for attachment_paths and body_html. It does not detail all 12 parameters individually, but the provided context is valuable.

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 action ('Update an existing draft') and the resource ('draft'). It distinguishes from siblings like create_draft by noting it operates on existing drafts and returns a new draft_id, making the purpose unambiguous.

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 implicitly tells when to use (to modify a draft) and provides caveats (e.g., external drafts may be slow), but it does not explicitly contrast with create_draft or delete_draft. However, the context is clear enough for an agent.

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