Skip to main content
Glama
adamzaidi

icloud-mcp

by adamzaidi

rename_mailbox

Rename an existing iCloud Mail mailbox or folder by specifying the current and new mailbox paths to reorganize your email structure.

Instructions

Rename an existing mailbox/folder

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
oldNameYesCurrent mailbox path
newNameYesNew mailbox path

Implementation Reference

  • Implementation of rename_mailbox tool. Uses imapflow's mailboxRename method with a timeout wrapper.
    export async function renameMailbox(oldName, newName, creds = null) {
      const client = createRateLimitedClient(creds);
      await client.connect();
      try {
        await Promise.race([
          client.mailboxRename(oldName, newName),
          new Promise((_, reject) =>
            setTimeout(() => reject(new Error('rename timed out after 15s — Apple IMAP may not support renaming this folder')), 15000)
          )
        ]);
      } finally {
        try { await client.logout(); } catch { client.close(); }
      }
      return { renamed: { from: oldName, to: newName } };
    }
Behavior2/5

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

With no annotations provided, the description carries full disclosure burden for a mutation operation. It fails to specify whether emails/subfolders are preserved, if the operation is atomic, idempotency, or required permissions. Only implies the mailbox must exist.

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

Conciseness3/5

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

The single sentence is front-loaded and wastes no words, but given zero annotations and lack of output schema, it is arguably underspecified rather than optimally concise. No structural issues, but insufficient depth for the complexity of a mutation tool.

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?

For a two-parameter mutation tool, the description meets minimum viability given good schema coverage, but gaps remain due to missing annotations and output schema. It omits what happens to contained emails, subfolder handling, and return value expectations.

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 description coverage is 100%, establishing a baseline of 3. The description adds no supplemental context about path syntax, delimiters, case sensitivity, or validation rules beyond what the schema already provides for 'oldName' and 'newName'.

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?

The description uses the specific verb 'Rename' and identifies the target resource as 'mailbox/folder'. It implicitly distinguishes from sibling tools create_mailbox and delete_mailbox by specifying 'existing', though it could further clarify path format or hierarchical behavior.

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

Usage Guidelines2/5

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

No explicit guidance on when to use this tool versus alternatives like bulk_move or delete_mailbox/create_mailbox. No mention of prerequisites (e.g., target must not exist) or error conditions. Only the word 'existing' hints at pre-conditions.

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