Skip to main content
Glama
sweetrb

apple-mail-mcp

by sweetrb

get-unread-count

Return the unread message count from Apple Mail, defaulting to the inbox or filtered by mailbox or account. Provides a simple number, with partial results flagged if any mailbox cannot be read.

Instructions

Use when: you only need the number of unread messages — INBOX by default, or scoped to one mailbox and/or account — without listing the messages themselves. Returns: the unread count for the requested scope (INBOX when no mailbox is given). If a source cannot be read the result carries partial: true + failedAccounts, and a total AppleScript failure returns an ERROR — a plain count is never a disguised transport failure. Do not use when: you need the actual unread messages and their ids (use list-messages with unreadOnly, or search-messages with isRead=false) or broader totals across every mailbox (use get-mail-stats).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
accountNoAccount to check
mailboxNoMailbox to check (default: INBOX)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
unreadNo
accountNo
mailboxNo
partialNo
failedAccountsNo
Behavior5/5

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

With no annotations provided, the description fully discloses behavior: it returns a count, handles partial failures with `partial: true` and `failedAccounts`, and distinguishes a total AppleScript failure returning an ERROR from a disguised transport failure. This is rich behavioral context beyond simple tool purpose.

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?

The description is well-organized into three labeled sections: 'Use when', 'Returns', and 'Do not use when'. Every sentence provides useful information with no fluff or repetition, and the structure makes it easy to scan.

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?

The description covers the tool's core purpose, edge cases (partial failures, errors), and clearly delineates when not to use it. Given that the output schema is present and the tool is simple, this description fully equips an agent to decide when and how to call it correctly.

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% (both account and mailbox have descriptions), so the baseline is 3. The description adds meaning by clarifying that the parameters can be used individually or together ('one mailbox and/or account'), which is not explicit in the schema. It also reiterates the INBOX default, reinforcing schema info but adding slight combination semantics.

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 description states a very specific purpose: returning the number of unread messages, with INBOX as default or scoped to one mailbox and/or account. It explicitly notes what the tool does NOT do ('without listing the messages themselves'), which sharply distinguishes it from sibling tools like list-messages.

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?

The description provides explicit 'Use when' and 'Do not use when' sections. It names concrete alternatives (list-messages with unreadOnly, search-messages with isRead=false, get-mail-stats) and clarifies the exact scenarios for which this tool is appropriate.

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/sweetrb/apple-mail-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server