Skip to main content
Glama
adamzaidi

icloud-mcp

by adamzaidi

bulk_move_by_sender

Move all emails from a specific sender to a designated folder in iCloud Mail. Use this tool to organize your inbox by relocating messages from particular senders in bulk operations.

Instructions

Move all emails from a specific sender to a folder

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
senderYesSender email address
targetMailboxYesDestination folder
sourceMailboxNoSource mailbox (default INBOX)
dryRunNoPreview only — return count without moving

Implementation Reference

  • The bulk_move_by_sender tool logic, which connects to IMAP, searches for emails by sender, and calls safeMoveEmails.
    export async function bulkMoveBySender(sender, targetMailbox, sourceMailbox = 'INBOX', dryRun = false, creds = null) {
      const client = createRateLimitedClient(creds);
      await client.connect();
      await client.mailboxOpen(sourceMailbox);
      const uids = (await client.search({ from: sender }, { uid: true })) ?? [];
      await client.logout();
      if (dryRun) return { dryRun: true, wouldMove: uids.length, sender, sourceMailbox, targetMailbox };
      if (uids.length === 0) return { moved: 0 };
      await ensureMailbox(targetMailbox, creds);
      const result = await safeMoveEmails(uids, sourceMailbox, targetMailbox, creds);
      return { ...result, sender, targetMailbox };
    }
Behavior2/5

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

With no annotations provided, the description carries the full burden but only minimally discloses the bulk nature ('all emails'). It fails to mention the dryRun safety feature (present in schema), reversibility concerns, partial failure behavior, or performance implications of bulk operations.

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?

Single sentence is front-loaded and efficient with no wasted words. However, extreme brevity contributes to missing critical behavioral and usage context that would require additional sentences.

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

Completeness2/5

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

For a bulk mutation tool with no annotations and no output schema, the description is inadequate. It fails to describe return values (success count? moved message IDs?), error conditions, or the dryRun preview capability, leaving agents uncertain about invocation outcomes.

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%, documenting all four parameters including dryRun and sourceMailbox defaults. The description implies usage of sender and folder but does not add syntax guidance or validation rules beyond the schema, warranting the baseline score.

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 ('Move'), clear resource ('all emails from a specific sender'), and distinguishes from siblings by specifying the 'by sender' filtering mechanism (differentiating it from bulk_move, bulk_move_by_domain, and move_email).

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 guidance provided on when to use this tool versus alternatives like bulk_move (general query-based moving), move_email (single item), or bulk_move_by_domain. Does not mention prerequisites or exclusion criteria.

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