Skip to main content
Glama
wylieswanson

apple-mail-mcp-server

by wylieswanson

update_mailbox

DestructiveIdempotent

Rename or move an existing mailbox within an Apple Mail account. Moving requires IMAP credentials; renaming does not. Gmail system labels are not supported.

Instructions

Rename and/or re-parent (move) an existing mailbox.

Two delivery paths:

  • Rename only (new_name set, new_parent is None): AppleScript. Fast, no IMAP credentials needed.

  • Move (new_parent set; optionally combined with rename): IMAP RENAME. Requires IMAP credentials in Keychain (#73 opt-in flow) — returns error_type: "imap_required" when missing.

At least one of new_name / new_parent must be provided.

Refused (#164): operations targeting the bare [Gmail] parent or any [Gmail]/... child path return error_type: "unsupported_gmail_system_label". Applies to both the source name and the resulting destination (new_parent join). Gmail's IMAP server doesn't support normal RENAME semantics for these paths; user-created Gmail labels (Newsletters, etc.) behave normally.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesCurrent mailbox name. Slash-separated for nested mailboxes (e.g. ``"Archive/2024"``).
accountYesMail.app account display name or UUID.
new_nameNoReplacement leaf name. ``None`` to keep the current leaf when moving. Path-traversal characters stripped via ``sanitize_mailbox_name``; an entirely-stripped value returns ``validation_error``.
new_parentNoDestination parent path. ``None`` keeps current parent (rename-only). ``""`` (empty string) moves to top-level. Non-empty string moves under that path.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

Annotations indicate mutation (readOnlyHint=false) and destructiveness (destructiveHint=true). The description adds details: IMAP credentials required for moves, error types like 'imap_required' and 'unsupported_gmail_system_label', and the AppleScript vs IMAP distinction. This enriches the behavioral model beyond annotations.

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 bullet points and clear separation of modes. It is slightly long but each sentence adds necessary context. It is front-loaded with the core purpose. Could be slightly more concise, but overall efficient.

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?

The description covers the complexity of two operational modes, prerequisites, error conditions, and Gmail-specific restrictions. With an output schema existing (as per context), it does not need to detail return values. All critical aspects are addressed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, but the description adds significant meaning: explains the two operational modes, the conditions for new_name and new_parent (at least one required), and special cases like empty string for new_parent. This greatly aids parameter understanding.

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 'Rename and/or re-parent (move) an existing mailbox,' using specific verbs and resource. It distinguishes from siblings like create_mailbox and delete_mailbox by focusing on modification 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 outlines two delivery paths (rename-only vs move) with distinct mechanisms (AppleScript, IMAP RENAME) and prerequisites (IMAP credentials). It also notes when Gmail system labels are unsupported, providing context for when not to use. It could explicitly state when to use this over alternatives like create_mailbox, but that is implied.

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