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;
    }

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