Skip to main content
Glama
adamzaidi

icloud-mcp

by adamzaidi

list_mailboxes

Retrieve all email folders and mailboxes from iCloud Mail to organize and manage your email structure effectively.

Instructions

List all mailboxes/folders in iCloud Mail

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Implementation of list_mailboxes tool which connects to the IMAP server, retrieves the folder tree, and flattens it into a list of mailbox objects containing name and path.
    export async function listMailboxes(creds = null) {
      const client = createRateLimitedClient(creds);
      await client.connect();
      const tree = await client.listTree();
      const mailboxes = [];
      function walk(items) {
        for (const item of items) {
          mailboxes.push({ name: item.name, path: item.path });
          if (item.folders && item.folders.length > 0) walk(item.folders);
        }
      }
      walk(tree.folders);
      await client.logout();
      return mailboxes;
    }
Behavior3/5

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

No annotations are provided, so the description must carry the full burden. It clearly indicates this is a read operation by using 'List', but lacks disclosure of what specific data is returned (e.g., folder names, IDs, hierarchy levels, message counts) since no output schema exists to supplement this information.

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?

The description is a single, efficient sentence with no wasted words. It is front-loaded with the action verb and immediately communicates scope, making it perfectly sized for a parameterless utility function.

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

Completeness4/5

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

Given the tool's simplicity (no input parameters) and lack of output schema, the description adequately covers the core functionality. It could be improved by briefly describing the return structure (e.g., 'returns folder names and paths'), but remains complete enough for agent selection.

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?

The input schema contains zero parameters. Per the evaluation rules, 0 parameters establishes a baseline score of 4, as there are no parameter semantics to clarify beyond the schema itself.

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 provides a specific verb ('List'), clear resource ('mailboxes/folders'), and scope ('all...in iCloud Mail'). It effectively distinguishes from siblings like create_mailbox, delete_mailbox, and get_mailbox_summary by emphasizing the enumeration aspect.

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?

While 'List all' implies this is for retrieving folder structure enumeration, there is no explicit guidance on when to use this versus get_mailbox_summary (which likely returns statistics) or other mailbox-related operations. Usage is implied but not explicitly stated.

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