Skip to main content
Glama
adamzaidi

icloud-mcp

by adamzaidi

flag_email

Mark or unmark an iCloud email as flagged to highlight important messages for follow-up or organization within your mailbox.

Instructions

Flag or unflag a single email

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
uidYesEmail UID
flaggedYesTrue to flag, false to unflag
mailboxNoMailbox name (default INBOX)

Implementation Reference

  • The 'flagEmail' tool implementation which adds or removes the '\\Flagged' flag from a specific email by UID.
    export async function flagEmail(uid, flagged, mailbox = 'INBOX', creds = null) {
      const client = createRateLimitedClient(creds);
      await client.connect();
      await client.mailboxOpen(mailbox);
      if (flagged) {
        await client.messageFlagsAdd(uid, ['\\Flagged'], { uid: true });
      } else {
        await client.messageFlagsRemove(uid, ['\\Flagged'], { 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 of behavioral disclosure. It successfully indicates the bidirectional nature of the operation (both flagging and unflagging), but omits details about idempotency, error handling for invalid UIDs, or whether the operation is persistent/write-based.

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 zero waste. It front-loads the core action and scope immediately, with no filler words or redundant explanations that duplicate the schema information.

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 low complexity (3 simple parameters, 100% schema coverage) and lack of output schema, the description provides sufficient context for agent selection. It appropriately omits return value documentation (not required without output schema) but could be improved by noting the state-changing nature of the operation.

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?

The input schema has 100% description coverage (uid, flagged, mailbox are all well-documented). Since the schema comprehensively defines parameter semantics including the default mailbox behavior, the description appropriately adds no redundant parameter details, meeting the baseline score of 3.

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 provides specific verbs ('Flag or unflag') and resource ('single email'), clearly distinguishing it from sibling tools like 'bulk_flag' by emphasizing the singular scope. It loses one point for not clarifying what 'flag' means in this email context (e.g., starring vs. marking as important).

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 constraints by specifying 'single email', suggesting it shouldn't be used for bulk operations. However, it fails to explicitly name 'bulk_flag' or 'bulk_flag_by_sender' as alternatives for multiple emails, leaving the agent to infer this from the naming convention alone.

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