Skip to main content
Glama
apple-mail-mcp

apple-mail-mcp

by sweetrb

get-mail-stats

Read-only

Retrieve aggregate mailbox statistics, including total, unread, and recent message counts for one account or all accounts with per-account breakdowns.

Instructions

Use when: you want aggregate mailbox statistics — total and unread message counts, recently-received counts (last 24h/7d/30d), and (for the all-accounts path) a per-account breakdown. Returns: totals, unread counts, recent-activity counts, and per-account figures. Do not use when: you only need a single unread number (use get-unread-count) or want to list the messages themselves (use list-messages / search-messages).

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get-mail-stats"
  }
}

Input Schema

NameRequiredDescriptionDefault
accountNoLimit to one account; uses fast IMAP STATUS if that account is IMAP-configured

Output Schema

NameRequiredDescriptionDefault
recentNo
accountNo
partialNo
accountsNo
perMailboxNo
queueWaitMsNo
totalUnreadNo
totalMessagesNo
failedAccountsNo
recentlyReceivedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv2.10.24
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. Changed1 schema field changedv2.10.9
    • addedOutput schema / properties / queueWaitMs
      Added value: +{
      +  "type": "number"
      +}
  3. Changed4 schema fields changedv2.10.8
    • changedOutput schema / additionalProperties
      Previous value: -falseNew value: +true
    • addedOutput schema / properties / failedAccounts
      Added value: +{
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / partial
      Added value: +{
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / perMailbox
      Added value: +{
      +  "items": {
      +    "additionalProperties": true,
      +    "properties": {},
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
  4. First observedv2.6.1

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so safety is covered; the description adds that the all-accounts path yields a per-account breakdown, which is a behavioral distinction not in the annotations. It does not disclose cost/latency characteristics of aggregate scans across many accounts, which would be the remaining valuable detail.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three labeled, front-loaded lines with no filler; the 'Use when' clause comes first and the exclusions last. The 'Returns' line partially restates what the output schema already provides, which is the only mild redundancy.

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

Completeness5/5

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

For a single-optional-parameter read tool with annotations and an output schema, the definition covers purpose, scope, the default all-accounts behavior, and sibling routing. Nothing an agent needs to invoke it correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and the single parameter already documents the fast IMAP STATUS path, so the baseline would be 3. The description adds meaning beyond that by distinguishing the 'all-accounts path' (the omitted-parameter case) and its per-account breakdown, clarifying the default behavior implied but not stated in the schema.

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?

The opening line names a specific resource (aggregate mailbox statistics) and enumerates the exact contents: total/unread counts, 24h/7d/30d recent counts, and a per-account breakdown. This is clearly separable from siblings like get-unread-count or list-messages without opening any schema.

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 structured as 'Use when' / 'Do not use when', and the negative case names the correct alternatives (get-unread-count for a single unread number, list-messages/search-messages for listing messages). The routing decision is fully resolved for the agent.

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