Skip to main content
Glama
TG-Techie

apple-mail-mcp

by TG-Techie

update_mailbox

Rename or move an Apple Mail mailbox. Change its name, relocate it under a new parent, or both. Moves require IMAP credentials.

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?

With no annotations provided, the description carries the full disclosure burden. It thoroughly covers error types (imap_required, unsupported_gmail_system_label, validation_error), special cases for Gmail system labels, and path-traversal sanitization. It doesn't explicitly state that the operation is non-destructive to the mailbox content, but the rename/move semantics are implicit. This is strong coverage.

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 longer than most, but it is well-structured with clear headings and bullet points, and the core purpose is front-loaded. Every sentence carries necessary information about behavior, errors, or conditions. It could arguably be tightened, but the density of essential details justifies the 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?

The tool has moderate complexity (two delivery paths, authentication requirements, Gmail restrictions), and the description addresses all of these thoroughly. It explains parameter combinations, error scenarios, and prerequisites. Although there is an output schema, the description still covers the necessary contextual and prereq info an agent needs to call it correctly.

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 substantial value beyond the schema: it explains the interplay between new_name and new_parent, the None defaults, the top-level move via empty string, and the sanitization behavior. The description resolves ambiguities that the schema alone would leave, such as what happens when both are null (error) and how Gmail paths are treated.

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: rename and/or re-parent an existing mailbox. Clearly distinguishes from siblings like create_mailbox and delete_mailbox by focusing on modification. The first sentence is unambiguous.

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?

Explicitly explains two delivery paths (rename vs move) with conditions on which parameters to set, the requirement that at least one be provided, and the IMAP credentials prerequisite for moves. Also clarifies unsupported Gmail paths with actionable error responses, so an agent knows exactly when to use rename vs move and what to expect.

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/TG-Techie/apple-mail-mcp'

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