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

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