Skip to main content
Glama
adamzaidi

icloud-mcp

by adamzaidi

mark_as_read

Mark iCloud Mail emails as read or unread to manage your inbox status. Specify email UID and desired read/unread state for precise email organization.

Instructions

Mark a single email as read or unread

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
uidYesEmail UID
seenYesTrue to mark as read, false for unread
mailboxNoMailbox name (default INBOX)

Implementation Reference

  • Implementation of the mark_as_read handler function in lib/imap.js.
    export async function markAsRead(uid, seen, mailbox = 'INBOX', creds = null) {
      const client = createRateLimitedClient(creds);
      await client.connect();
      await client.mailboxOpen(mailbox);
      if (seen) {
        await client.messageFlagsAdd(uid, ['\\Seen'], { uid: true });
      } else {
        await client.messageFlagsRemove(uid, ['\\Seen'], { uid: true });
      }
      await client.logout();
      return true;
    }
Behavior3/5

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

With no annotations provided, the description carries the full burden. It indicates a state mutation ('mark') but does not disclose idempotency, error handling for invalid UIDs, or whether the operation is destructive. It confirms the toggle nature (read or unread) which is the essential behavioral trait.

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 8-word sentence with no filler. It is front-loaded with the action verb and immediately qualifies scope ('single') and capability ('read or unread'), earning every word.

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 low complexity of a single-item state toggle and 100% input schema coverage, the description is functionally complete. The absence of an output schema is acceptable as the operation likely returns simple success/failure, though explicit confirmation of the return type would improve completeness further.

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%, with all three parameters (uid, seen, mailbox) fully documented in the schema. The description adds no additional parameter semantics beyond what the schema provides, meeting the baseline expectation 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?

The description uses specific verb 'Mark' with clear resource 'single email' and states both possible states ('read or unread'). The word 'single' effectively distinguishes it from the 'bulk_mark_read' and 'bulk_mark_unread' siblings without explicitly naming them.

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?

The description implies usage through the 'single' keyword (suggesting individual vs. batch operations) but provides no explicit guidance on when to choose this over 'bulk_mark_read'/'bulk_mark_unread' or other alternatives. No prerequisites or exclusions are 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