Skip to main content
Glama
apple-mail-mcp

apple-mail-mcp

by sweetrb

resolve-message-id

Read-only

Converts imap: message IDs into numeric Mail.app IDs needed by reply and forward tools. Returns each numericId or null when unresolvable.

Instructions

Use when: you have imap: message id(s) and genuinely need the numeric Mail.app id(s) — e.g. for reply-to-message/forward-message, which are numeric-id only. NOTE: as of 2.10.0 you no longer need this to apply a flag COLOR — flag-message/batch-flag-messages write the color over IMAP directly via Mail.app's $MailFlagBit0/1/2 keywords, so a smart mailbox keyed on flag color matches an IMAP-flagged message. Each imap: id is resolved via its RFC822 Message-ID. Returns: for each input id, its numericId (the AppleScript id) or null when it can't be resolved, plus the messageId used; and a resolvedCount. Do not use when: your ids are already numeric (they pass straight through), or you don't need a color — flag/move/mark tools operate on imap: ids directly.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "ids": "<ids>"
    },
    "name": "resolve-message-id"
  }
}

Input Schema

NameRequiredDescriptionDefault
idsYes

Output Schema

NameRequiredDescriptionDefault
countNo
resolvedNo
resolvedCountNo

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.8
    • changedOutput schema / additionalProperties
      Previous value: -falseNew value: +true
  3. Addedv2.8.14
  4. Removedv2.8.10
  5. Addedv2.8.2

TDQS

A4.3/5.0
Behavior3/5

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

Annotations already establish readOnlyHint=true and openWorldHint=false, so safety is covered; the description adds the real behavioral detail that each id is resolved via its RFC822 Message-ID and that unresolvable ids come back as null rather than failing. However, it partly restates the return shape that the output schema already documents, and says nothing about failure behavior beyond null (e.g. partial failures, the 100-item cap impact).

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 Use-when / Returns / Do-not-use-when structure is front-loaded and scannable. The version-2.10.0 note about flag color is a migration changelog detail that is longer than it needs to be for an agent deciding whether to call the tool, though it does prevent a plausible misuse.

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

Completeness4/5

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

For a single-parameter, read-only resolution helper with an output schema, the definition covers purpose, trigger conditions, exclusions, and resolution mechanism. The only shortfall is behavioral edge cases (batch limits, partial resolution outcomes), which are minor given the output schema and annotations.

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 0%, so the description must compensate, and it does: it explains that the `ids` parameter takes `imap:` form, accepts multiple ids, and that numeric ids pass straight through untouched. It does not mention the 100-item maximum or the per-element string pattern, but the essential semantic — what forms are valid and what happens to each — is conveyed.

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 names a specific transformation (resolve `imap:` ids to numeric Mail.app ids) and states the mechanism (RFC822 Message-ID lookup). It also distinguishes itself from flag/move/mark siblings, which operate on `imap:` ids directly, so an agent can place it precisely among the 50+ sibling tools.

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 gives explicit positive conditions ('you genuinely need the numeric Mail.app id — e.g. for reply-to-message/forward-message') and explicit negative ones ('Do not use when: your ids are already numeric... or you don't need a color'). The alternatives are named, so the routing decision is fully determined.

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