Skip to main content
Glama
adamzaidi

icloud-mcp

by adamzaidi

bulk_mark_read

Mark all emails as read in iCloud Mail, with optional filtering by sender to manage inbox notifications efficiently.

Instructions

Mark all emails as read, optionally filtered by sender

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
mailboxNoMailbox (default INBOX)
senderNoOptional: only mark emails from this sender as read

Implementation Reference

  • The function bulkMarkRead marks emails as read based on optional sender filter.
    export async function bulkMarkRead(mailbox = 'INBOX', sender = null, creds = null) {
      const client = createRateLimitedClient(creds);
      await client.connect();
      await client.mailboxOpen(mailbox);
      const query = sender ? { from: sender, seen: false } : { seen: false };
      const uids = (await client.search(query, { uid: true })) ?? [];
      if (uids.length === 0) { await client.logout(); return { marked: 0 }; }
      await client.messageFlagsAdd(uids, ['\\Seen'], { uid: true });
      await client.logout();
      return { marked: uids.length, sender: sender || 'all' };
    }
Behavior2/5

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

With no annotations provided, the description carries full burden but omits critical safety context: it doesn't warn that this mutates email state, affects potentially thousands of emails if unfiltered, or mention that 'bulk_mark_unread' can reverse it. For a bulk write operation, this lack of behavioral disclosure is a significant gap.

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?

Single sentence, front-loaded with the primary action ('Mark all emails as read'), followed by the conditional scope. No redundancy or filler. Efficient length for the complexity level.

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?

Adequate for a two-parameter tool with complete schema documentation, but falls short for a bulk mutation operation. Missing: return value description, safety warnings about unfiltered usage, and reversibility notes. However, given the simple parameter structure and lack of output schema, it meets minimum viability.

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%, so the baseline is 3. The description adds conceptual framing ('optionally filtered by sender') that aligns with the schema parameters, but doesn't provide syntax examples, format constraints, or semantic relationships beyond what's already in the schema.

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 clearly states the action ('Mark... as read') and resource ('emails'), using 'all' to indicate bulk scope. The phrase 'optionally filtered by sender' distinguishes it from date-based bulk variants like 'mark_older_than_read' and implies the difference from single-email 'mark_as_read', though it doesn't explicitly name siblings.

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 versus 'mark_as_read' (single email) or 'mark_older_than_read' (date-based). No warning about the scope of 'all emails' or prerequisites. The agent must infer usage solely from the parameter descriptions.

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