Skip to main content
Glama
adamzaidi

icloud-mcp

by adamzaidi

delete_mailbox

Remove an empty mailbox or folder from iCloud Mail to organize email storage and manage folder structure.

Instructions

Delete a mailbox/folder. The folder must be empty first.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesMailbox path to delete

Implementation Reference

  • Implementation of the delete_mailbox tool. It connects to the IMAP server and uses client.mailboxDelete to delete the specified folder.
    export async function deleteMailbox(name, creds = null) {
      const client = createRateLimitedClient(creds);
      await client.connect();
      try {
        await Promise.race([
          client.mailboxDelete(name),
          new Promise((_, reject) =>
            setTimeout(() => reject(new Error('delete timed out after 15s — Apple IMAP may not support deleting this folder')), 15000)
          )
        ]);
      } finally {
        try { await client.logout(); } catch { client.close(); }
      }
      return { deleted: name };
    }
Behavior3/5

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

No annotations provided, so description carries full burden. Mentions the empty-folder constraint but omits other critical behavioral details: whether deletion is permanent, what error occurs if preconditions fail, or permission requirements.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, zero waste. Front-loaded with action, followed by constraint. Efficient and appropriately sized for the tool's complexity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Minimum viable for a single-parameter tool. Covers the essential constraint but lacks safety warnings appropriate for a destructive operation, especially given absent annotations and no output schema to indicate success/failure modes.

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 has 100% description coverage ('Mailbox path to delete'), so the structured data fully documents the parameter. Description adds no parameter-specific details, meeting baseline expectations for high-coverage schemas.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States specific action (Delete) and resource (mailbox/folder) clearly. Distinguishes from sibling 'delete_email' by specifying folder-level operation, though could explicitly contrast with 'empty_trash' or 'bulk_delete'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides critical prerequisite ('folder must be empty first'), which implies when the tool will fail. However, lacks explicit guidance on when to use versus alternatives like 'empty_trash' or how to handle non-empty folders.

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/adamzaidi/icloud-mcp'

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