Skip to main content
Glama
apple-mail-mcp

apple-mail-mcp

by sweetrb

update-saved-draft

Destructive

Edits an existing IMAP draft's subject, body, recipients, or attachments after reviewing its current revision, with a dry-run preview and approval hashes before applying changes.

Instructions

Use when: editing an existing stored draft's subject, body, recipients or attachments after reviewing its current revision. IMAP-only: use an imap: id from the configured account's SPECIAL-USE Drafts mailbox. dryRun defaults to true and can show proposed changes. Returns: the current preview and UIDVALIDITY/UID/MIME SHA-256; after an update the new draftId and preview, with the old-revision cleanup result reported separately. Do not use when: creating a new message (use create-draft), editing a non-draft or an AppleScript-only account, or sending mail. Signed/encrypted, ambiguous or unpreviewable MIME is refused. Safety: changes a stored draft only; never calls SMTP or sends mail. Obtain approval for the changes and pass the current preview's approvedSha256 and approvedUidValidity with dryRun=false. APPEND is confirmed before targeted removal of the old UID. UIDPLUS is required to avoid global EXPUNGE. Unknown APPEND and cleanup failures must be inspected, never blindly retried.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "draftId": "<draftId>"
    },
    "name": "update-saved-draft"
  }
}

Input Schema

NameRequiredDescriptionDefault
dryRunNoPreview only by default. false applies the changes; never sends mail.
changesNoPartial patch. Omitted fields are preserved; [] clears To/Cc/Bcc. Adding/removing attachments is explicit.
draftIdYesAn imap: ID freshly listed in the account's SPECIAL-USE Drafts mailbox. Numeric IDs are refused.
approvedSha256NoCurrent stored MIME SHA-256 from preview, required to apply changes.
approvedUidValidityNoCurrent mailbox UIDVALIDITY from preview, required to apply changes.

Output Schema

NameRequiredDescriptionDefault
okNo
errorNo
statusNo
draftIdNo
previewNo
proposedNo
sourceDraftIdNo
sourceRemovedNotrue only after confirmed removal; omitted if cleanup's outcome is uncertain.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.20.57

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare destructive=true and readOnly=false, and the description goes well beyond them: dryRun defaults to true, mutations require approvedSha256 and approvedUidValidity, APPEND is confirmed before targeted removal of the old UID, UIDPLUS is required to avoid a global EXPUNGE, and signed/encrypted/ambiguous MIME is refused. It also warns that unknown APPEND and cleanup failures must be inspected rather than retried, which is exactly the operational context an agent cannot get from the schema.

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?

Dense but structurally front-loaded with Use when / Returns / Do not use when / Safety labels, so an agent can skim to the needed section. It is long and a few clauses (preview's SHA-256 and UIDVALIDITY restated twice) could be trimmed, but nearly every sentence carries decision-relevant information.

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?

For a destructive, multi-mode mutation with nested parameters and an approval gate, the definition covers timing, prerequisites, refusal cases, failure-handling and the safety boundary of never sending mail. Return values are also summarized even though an output schema exists, leaving no material gap for correct invocation.

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%, so the baseline is 3; the description adds real meaning on top by framing changes as a partial patch with its own preservation semantics, explaining that approval fields gate the write, and clarifying that draftId must be a fresh imap: ID rather than numeric. It stops short of covering every nested field, but the schema already does that.

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 and resource ('editing an existing stored draft') plus the exact editable fields (subject, body, recipients, attachments) and the revision precondition. It is clearly distinguishable from create-draft, which it names explicitly.

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?

Provides an explicit 'Use when' block, an explicit 'Do not use when' block that names the alternative (create-draft) and the excluded cases (non-drafts, AppleScript-only accounts, sending), plus hard preconditions such as IMAP-only and imap: IDs from the SPECIAL-USE Drafts mailbox.

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