Skip to main content
Glama
apple-mail-mcp

apple-mail-mcp

by sweetrb

list-messages

Read-only

Browse recent messages in an Apple Mail mailbox, filter by sender or unread status, paginate with limit and offset, and retrieve message IDs for follow-up actions.

Instructions

Use when: browsing a mailbox's recent messages (optionally filtered by sender or unread-only) with pagination via limit/offset, and you need their ids. Returns: messages with id, date, subject, sender, mailbox and account (each text line names its mailbox and account when the results can come from more than one), and flagColor when flagged with an explicit color (plus partial-coverage diagnostics when some mailboxes were skipped). Do not use when: you have specific search criteria like subject/date/flags/flag color (use search-messages, which also supports filtering by flagColor) or already have an id and want the body (use get-message). Like search-messages, use this to obtain the ids that read/mark/delete/move and batch tools require.

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-messages"
  }
}

Input Schema

NameRequiredDescriptionDefault
fromNoFilter by sender email address or name
limitNoMaximum number of messages (default: 50, max: 500)
offsetNoNumber of messages to skip (for pagination)
accountNoAccount to list messages from
mailboxNoMailbox to list messages from. Omit to list from all mailboxes.
unreadOnlyNoOnly show unread messages

Output Schema

NameRequiredDescriptionDefault
countNo
backendNo
partialNo
messagesNo
stoppedByNo
failedMailboxesNo
omittedMessagesNo
backendByAccountNo
timedOutAccountsNo
timedOutMailboxesNo
failedMailboxReasonsNo
notSearchedMailboxesNo
skippedLargeMailboxesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv2.20.45
    • addedOutput schema / properties / backend
      Added value: +{
      +  "enum": [
      +    "envelope-index",
      +    "applescript",
      +    "mixed"
      +  ],
      +  "type": "string"
      +}
    • addedOutput schema / properties / backendByAccount
      Added value: +{
      +  "additionalProperties": {
      +    "enum": [
      +      "envelope-index",
      +      "applescript"
      +    ],
      +    "type": "string"
      +  },
      +  "propertyNames": {
      +    "type": "string"
      +  },
      +  "type": "object"
      +}
  2. Changed1 schema field changedv2.20.29
    • addedOutput schema / properties / failedMailboxReasons / propertyNames
      Added value: +{
      +  "type": "string"
      +}
  3. Changed2 schema fields changedv2.20.11
    • addedOutput schema / properties / stoppedBy
      Added value: +{
      +  "enum": [
      +    "deadline",
      +    "cancelled"
      +  ],
      +  "type": "string"
      +}
    • addedOutput schema / properties / timedOutMailboxes
      Added value: +{
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
  4. Changed1 schema field changedv2.19.19
    • addedOutput schema / properties / omittedMessages
      Added value: +{
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "id": {
      +        "type": "string"
      +      },
      +      "mailbox": {
      +        "type": "string"
      +      },
      +      "reason": {
      +        "type": "string"
      +      },
      +      "uid": {
      +        "type": "number"
      +      }
      +    },
      +    "required": [
      +      "id",
      +      "mailbox",
      +      "uid",
      +      "reason"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
  5. Changed1 schema field changedv2.19.14
    • addedOutput schema / properties / failedMailboxReasons
      Added value: +{
      +  "additionalProperties": {
      +    "type": "string"
      +  },
      +  "type": "object"
      +}
  6. Changed1 schema field changedv2.17.2
    • addedOutput schema / properties / failedMailboxes
      Added value: +{
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
  7. 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"
  8. Changed1 schema field changedv2.10.8
    • changedOutput schema / additionalProperties
      Previous value: -falseNew value: +true
  9. Addedv2.8.14
  10. Removedv2.8.10
  11. Changed6 schema fields changedv2.8.2
    • changedInput schema / properties / limit / description
      Previous value: -"Maximum number of messages (default: 50)"New value: +"Maximum number of messages (default: 50, max: 500)"
    • addedInput schema / properties / limit / maximum
      Added value: +500
    • addedInput schema / properties / limit / minimum
      Added value: +1
    • changedInput schema / properties / limit / type
      Previous value: -"number"New value: +"integer"
    • addedInput schema / properties / offset / minimum
      Added value: +0
    • changedInput schema / properties / offset / type
      Previous value: -"number"New value: +"integer"
  12. First observedv2.6.1

TDQS

A4.4/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, but the description adds real behavioral detail: results can span multiple mailboxes and each text line names its mailbox/account, flagColor only appears when explicitly colored, and partial-coverage diagnostics are returned when some mailboxes are skipped. It does not discuss defaults (the schema covers limit=50) or ordering guarantees, keeping it short of a 5.

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?

The three-block structure (Use when / Returns / Do not use when) is well front-loaded and scannable. There is minor redundancy around ids being the purpose, stated both in the opening and the closing sentence, but each sentence largely earns its place.

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 six-parameter list tool with a full input schema and an output schema, the description covers scope, exclusions, return fields, and multi-mailbox edge behavior (partial coverage). Nothing an agent needs 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.

Parameters3/5

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

Schema description coverage is 100%, so every parameter is already documented, and the description mostly restates them (sender filter, unread-only, limit/offset pagination). It adds no syntax guidance for the 'from' filter or account/mailbox interplay beyond what the schema says, so the baseline 3 applies.

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 opens with a concrete verb+resource ('browsing a mailbox's recent messages') and immediately states the outcome ('you need their ids'). It explicitly names the sibling tools it is not (search-messages, get-message), so an agent can route correctly 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?

It provides an explicit 'Use when' block with the allowed narrow filters (sender, unread-only, pagination) and a matching 'Do not use when' block that routes to search-messages for subject/date/flag criteria and get-message for body retrieval by id. The final sentence adds downstream context (obtaining ids for read/mark/delete/move and batch tools).

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