Skip to main content
Glama
apple-mail-mcp

apple-mail-mcp

by sweetrb

list-mailboxes

Read-only

Discover mailbox and folder paths with unread and message counts for an account, so you can target moves or searches at the right mailbox before acting.

Instructions

Use when: discovering the mailbox/folder paths (and unread/message counts) available in an account, e.g. before moving messages or searching a specific mailbox. Returns: each mailbox's canonical account-relative path in name, unread/message counts, and a total count. Use the full path for nested mailboxes (for example Archive/Inbox); a top-level Inbox remains Inbox. A source that could not be read is NAMED — the result carries partial: true + failedAccounts and the list is a floor, not the complete set — and a listing Mail refused outright (e.g. an account that does not exist) returns an ERROR naming the accounts that do exist, never an empty list. Do not use when: you want the messages inside a mailbox (use list-messages or search-messages) or the list of accounts (use list-accounts). Note: Mail's local "On My Mac" mailboxes are not part of any account, so they are reported under the synthetic account label "On My Mac" — an unscoped call includes them, and account: "On My Mac" lists only them. They will not appear in list-accounts, which reports real accounts only.

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": "list-mailboxes"
  }
}

Input Schema

NameRequiredDescriptionDefault
accountNoAccount to list mailboxes from

Output Schema

NameRequiredDescriptionDefault
countNo
partialNo
mailboxesNo
failedAccountsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv2.16.1
    • addedOutput schema / properties / failedAccounts
      Added value: +{
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / partial
      Added value: +{
      +  "type": "boolean"
      +}
  2. 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"
  3. Changed1 schema field changedv2.10.8
    • changedOutput schema / additionalProperties
      Previous value: -falseNew value: +true
  4. Addedv2.9.0
  5. Removedv2.8.10
  6. First observedv2.6.1

TDQS

A4.9/5.0
Behavior5/5

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

Beyond readOnlyHint and openWorldHint, the description discloses genuinely non-obvious behavior: partial failures set `partial: true` with `failedAccounts`, the list is a floor rather than a complete set, and a refused listing returns an error naming existing accounts instead of an empty list. The synthetic 'On My Mac' account pseudo-entity is behavior an agent could not infer from annotations or schema.

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?

Well front-loaded with labeled 'Use when', 'Returns', 'Do not use when', and 'Note' sections, so an agent can scan to what it needs. The 'Returns' block is somewhat long given an output schema exists, though the partial/error semantics it explains are behavioral rather than structural.

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?

Covers the full surface of a one-parameter read tool: what it lists, what the paths look like for nested mailboxes, how failures surface, and the local-mailbox pseudo-account. Nothing an agent needs in order to call it correctly or interpret results is missing.

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

Parameters5/5

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

Schema coverage is already 100%, but the description adds real meaning about the single `account` parameter: omitting it unscopes the call and includes 'On My Mac', while `account: "On My Mac"` lists only local mailboxes. It also explains that paths are canonical and account-relative, which is not derivable from 'Account to list mailboxes from'.

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?

States a specific verb and resource: discovering mailbox/folder paths with unread and message counts available in an account. It distinguishes itself from list-accounts, list-messages, search-messages, and implicitly list-smart-mailboxes, so an agent can select it 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?

Explicit 'Use when' names the triggering scenario (before moving messages or searching a specific mailbox) and 'Do not use when' routes to list-messages/search-messages for message contents and list-accounts for real accounts. The 'On My Mac' note further clarifies an edge case that would otherwise cause wrong tool selection.

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