Skip to main content
Glama
apple-mail-mcp

apple-mail-mcp

by sweetrb

get-unread-count

Read-only

Returns the number of unread messages in INBOX by default, or scoped to a specific mailbox or account, without listing the messages themselves. Use it when you only need the count.

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).

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-unread-count"
  }
}

Input Schema

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

Output Schema

NameRequiredDescriptionDefault
unreadNo
accountNo
mailboxNo
partialNo
failedAccountsNo

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. Changed3 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"
      +}
  3. Changed1 schema field changedv2.9.0
    • changedInput schema / properties / mailbox / description
      Previous value: -"Mailbox to check (default: all)"New value: +"Mailbox to check (default: INBOX)"
  4. Addedv2.8.14
  5. Removedv2.8.10
  6. First observedv2.6.1

TDQS

A4.7/5.0
Behavior5/5

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

Beyond readOnlyHint and openWorldHint=false, the description discloses important behavior: default INBOX scope, partial results with partial=true and failedAccounts, and total AppleScript failure returning an ERROR rather than a misleading count. This adds valuable operational context not covered by annotations.

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?

It is front-loaded and structured as Use when / Returns / Do not use when, making the decision path easy for an agent to follow. There is minor repetition about INBOX defaults, but no meaningful waste.

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 tool is simple, but the description covers default scope, alternatives, and failure/partial-result behavior. With an output schema already present and annotations covering safety, the definition gives the agent everything needed to call and interpret this tool correctly.

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%, so account and mailbox are already documented. The description reinforces the default INBOX behavior and scoping concept, but does not add much syntax or format detail beyond the schema descriptions.

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 specific verb/resource: it returns the number of unread messages, scoped by mailbox/account, without listing messages. It clearly distinguishes this count-only operation from message-listing siblings.

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?

It explicitly says when to use the tool, when not to use it, and names the alternatives: list-messages with unreadOnly, search-messages with isRead=false, and get-mail-stats. The routing guidance is unusually complete.

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