Skip to main content
Glama
s-morgan-jeffries

apple-mail-mcp

delete_mailbox

DestructiveIdempotent

Delete a mailbox from your Apple Mail account using IMAP, requiring user confirmation. By default, only empty mailboxes can be deleted; use the cascade flag to delete messages too.

Instructions

Delete a mailbox via IMAP.

Mail.app's AppleScript dictionary doesn't expose a working delete primitive for mailboxes, so this operation goes through IMAP. Requires IMAP credentials in Keychain (#73 opt-in flow) — returns error_type: "imap_required" when missing.

Always elicits user confirmation (destructive). By default refuses non-empty mailboxes to prevent accidental data loss; pass delete_messages=True to cascade.

Refused (#164): targeting the bare [Gmail] parent or any [Gmail]/... child path returns error_type: "unsupported_gmail_system_label". Gmail's IMAP server doesn't support DELETE for these paths.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesMailbox name. Slash-separated for nested mailboxes.
accountYesMail.app account display name or UUID.
delete_messagesNoWhen False (default), refuse if the mailbox contains messages. When True, cascade-delete the mailbox and its contents.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

Beyond annotations (destructiveHint=true), description adds specifics: IMAP requirement, user confirmation, refusal of non-empty mailboxes, Gmail restrictions, and error types. No contradiction.

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?

Well-structured with bullet points, front-loaded with main purpose. Slightly long but each sentence adds value; could be marginally shorter.

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 complexity (destructive, IMAP, error cases), description covers prerequisites, behavioral nuances, and edge cases comprehensively. Output schema exists but description completes context.

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?

Input schema covers all 3 parameters with descriptions; description adds context (slash-separated for name, display name or UUID for account, default behavior for delete_messages) beyond schema.

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 tool deletes a mailbox via IMAP, explains why (AppleScript limitation), and distinguishes from sibling tools like delete_messages.

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 describes when to use (requires IMAP credentials, user confirmation), when not to use (non-empty mailbox by default, Gmail system labels), and alternatives (delete_messages for messages).

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/s-morgan-jeffries/apple-mail-fast-mcp'

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