Skip to main content
Glama
icloud-mcp

icloud-mcp

by adamzaidi

count_emails

Count emails matching specific criteria like sender, date, or keywords to preview results before bulk operations in iCloud Mail.

Instructions

Count how many emails match a set of filters without moving or deleting them. Use this before bulk_move or bulk_delete to preview how many emails will be affected.

Input Schema

NameRequiredDescriptionDefault
sinceNoOnly emails since this date (YYYY-MM-DD)
beforeNoOnly emails before this date (YYYY-MM-DD)
domainNoMatch any sender from this domain (e.g. substack.com)
largerNoOnly emails larger than this size in KB
senderNoMatch exact sender email address
unreadNoTrue for unread only, false for read only
accountNoAccount name to use (e.g. 'icloud', 'gmail'). Defaults to first configured account. Use list_accounts to see available accounts.
flaggedNoTrue for flagged only, false for unflagged only
mailboxNoMailbox to count in (default INBOX)
smallerNoOnly emails smaller than this size in KB
subjectNoKeyword to match in subject
hasAttachmentNoOnly emails with attachments (client-side BODYSTRUCTURE scan — must be combined with other filters that narrow results to under 500 emails first)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.5.1

TDQS

A4.1/5.0
Behavior3/5

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

No annotations provided, so description carries full burden. It successfully communicates the non-destructive/safe nature ('without moving or deleting'), which is critical given the sibling context. However, it lacks disclosure of return value format, rate limits, or performance characteristics beyond the hasAttachment constraint buried in the schema.

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?

Two sentences with zero waste. First sentence front-loads the core action and safety guarantee; second sentence provides workflow context. Every word earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Despite 12 parameters and no output schema, the description omits what the tool returns (a number? an object?). The hasAttachment parameter has a critical 500-email limit constraint documented only in the schema. Adequate but has clear gaps regarding return value and high-impact parameter constraints.

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 12 well-documented filter parameters. The description references 'a set of filters' acknowledging the filtering capability without redundant enumeration. Baseline 3 is appropriate since schema carries the full semantic load.

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 'Count' with resource 'emails' and explicit scope 'without moving or deleting them'. Clearly distinguishes from destructive sibling tools like bulk_move and bulk_delete by contrasting its non-destructive nature.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly states 'Use this before bulk_move or bulk_delete to preview how many emails will be affected', providing clear workflow guidance and indicating when to prefer this tool over immediate destructive actions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.