Skip to main content
Glama
LeChabrax

Apple Mail MCP Server

by LeChabrax

update_mailbox

DestructiveIdempotent

Rename or move an existing mailbox to a new parent folder. Use for reorganizing Apple Mail folders; moves require IMAP credentials, and Gmail system labels are unsupported.

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 already declare readOnlyHint=false, destructiveHint=true, and idempotentHint=true, and the description does not contradict them — the mutation framing is consistent. Beyond the annotations, it adds genuinely useful behavioral detail: the two execution mechanisms (AppleScript vs IMAP RENAME), the imap_required error for missing credentials, and the unsupported_gmail_system_label refusal with its rationale. This is valuable context that structured fields cannot express.

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 front-loaded with the purpose statement and uses headers, bullets, and inline code formatting to keep distinct behaviors scannable. It is longer than average, but every section maps to a concrete operational concern (delivery paths, validation, refusal conditions) so no sentence is wasted. Formatting trades some brevity for readability and earns its length.

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 tool with 4 parameters, two execution paths, and multiple edge cases, the description is remarkably complete. It covers prerequisites (IMAP Keychain credentials), the validation rule, both error_type outcomes, and the Gmail system-label distinction between refused and allowed paths. An output schema exists, so return-value prose is appropriately omitted; nothing needed to call this correctly is missing.

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%, so per calibration the baseline is 3. The schema already thoroughly documents each parameter (leaf-name sanitization, None semantics, empty-string top-level move). The description adds value by explaining the interaction between new_name and new_parent — how their combination selects the delivery path — which goes slightly beyond the schema, but not enough to exceed baseline.

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 opens with a specific verb-plus-resource statement — 'Rename and/or re-parent (move) an existing mailbox' — that clearly differentiates this from its siblings create_mailbox, delete_mailbox, and list_mailboxes. The two delivery paths further specify the operation's scope without ambiguity.

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?

It gives strong conditional guidance: which path executes depending on whether new_name vs new_parent is set, when IMAP credentials are needed, and the validation requirement that at least one parameter be provided. It enumerates the two refusal conditions and their trigger criteria. It stops short of explicitly naming alternative tools or when-not-to-use scenarios, but the path selection logic is thorough enough that an agent can route correctly.

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