Skip to main content
Glama
adamzaidi

icloud-mcp

by adamzaidi

get_mailbox_summary

Retrieve email statistics including total, unread, and recent message counts for any iCloud Mail folder to monitor inbox activity and manage email organization.

Instructions

Get total, unread, and recent email counts for any specific mailbox/folder

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
mailboxYesMailbox path to summarize (e.g. Newsletters, Archive)

Implementation Reference

  • The handler function `getMailboxSummary` connects to the IMAP server, queries the status of the specified mailbox for message counts (total, unseen, recent), and returns the summary.
    export async function getMailboxSummary(mailbox, creds = null) {
      const client = createRateLimitedClient(creds);
      await client.connect();
      const status = await client.status(mailbox, { messages: true, unseen: true, recent: true });
      await client.logout();
      return { mailbox, total: status.messages, unread: status.unseen, recent: status.recent };
    }
Behavior2/5

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

No annotations provided, so description carries full burden. States it retrieves counts but fails to define what 'recent' means (time window?), disclose performance characteristics, or describe the return structure.

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 efficient sentence front-loaded with specific metrics (total, unread, recent). Zero redundancy; every word specifies scope or resource.

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?

Adequate for a simple single-parameter read operation. Minor gap: undefined 'recent' metric and no output schema, though the three count types are enumerated.

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 coverage is 100% with the 'mailbox' parameter well-documented ('Mailbox path to summarize'). Description mentions 'mailbox/folder' but adds no semantic details beyond the schema (e.g., case sensitivity, path separators, validation rules).

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Specific verb 'Get' with clear resource 'mailbox/folder' and precise scope 'total, unread, and recent email counts'. Effectively distinguishes from sibling 'get_inbox_summary' by emphasizing 'any specific' folder capability.

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?

Implies usage for arbitrary folders via 'any specific mailbox/folder', differentiating it from inbox-specific tools, but lacks explicit when-to-use guidance or named alternatives like 'count_emails' or 'get_inbox_summary'.

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