Skip to main content
Glama
sweetrb

apple-mail-mcp

by sweetrb

flag-message

Use when: flagging a single message (by id), optionally with a color (red/orange/yellow/green/blue/purple/gray). Returns: a confirmation that the message was flagged (and the color, when applied).

Instructions

Use when: flagging a single message (by id), optionally with a color (red/orange/yellow/green/blue/purple/gray). Returns: a confirmation that the message was flagged (and the color, when applied). Do not use when: flagging several at once (use batch-flag-messages) or removing a flag (use unflag-message). Get the id from search-messages or list-messages first. Note: the color is applied on both routes — AppleScript sets the flag index, IMAP writes the equivalent $MailFlagBit0/1/2 keywords Mail.app reads — and search-messages' flagColor filter finds colored messages again later, so a color works as a cross-mailbox label.

Input Schema

NameRequiredDescriptionDefault
idYes
colorNoOptional flag color (Apple Mail palette: red, orange, yellow, green, blue, purple, gray — 'grey' accepted). Omit for Mail's default flag. The color is applied on both routes: AppleScript sets the flag index, and IMAP writes the equivalent $MailFlagBit0/1/2 keywords Mail.app reads — so a smart mailbox keyed on flag color matches either way.

Output Schema

NameRequiredDescriptionDefault
idNo
okNo
colorNo
colorAppliedNo

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. Changed2 schema fields changedv2.10.8
    • changedInput schema / properties / color / description
      Previous value: -"Optional flag color (Apple Mail palette: red, orange, yellow, green, blue, purple, gray — 'grey' accepted). Omit for Mail's default flag. Colors are applied via Mail.app (AppleScript); for an IMAP-routed message id the flag is set but the color is not applied (IMAP flags are colorless)."New value: +"Optional flag color (Apple Mail palette: red, orange, yellow, green, blue, purple, gray — 'grey' accepted). Omit for Mail's default flag. The color is applied on both routes: AppleScript sets the flag index, and IMAP writes the equivalent $MailFlagBit0/1/2 keywords Mail.app reads — so a smart mailbox keyed on flag color matches either way."
    • changedOutput schema / additionalProperties
      Previous value: -falseNew value: +true
  3. Addedv2.9.0
  4. Removedv2.8.10
  5. Changed3 schema fields changedv2.8.2
    • addedInput schema / properties / color
      Added value: +{
      +  "description": "Optional flag color (Apple Mail palette: red, orange, yellow, green, blue, purple, gray — 'grey' accepted). Omit for Mail's default flag. Colors are applied via Mail.app (AppleScript); for an IMAP-routed message id the flag is set but the color is not applied (IMAP flags are colorless).",
      +  "enum": [
      +    "red",
      +    "orange",
      +    "yellow",
      +    "green",
      +    "blue",
      +    "purple",
      +    "gray",
      +    "grey"
      +  ],
      +  "type": "string"
      +}
    • addedOutput schema / properties / color
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / colorApplied
      Added value: +{
      +  "type": "boolean"
      +}
  6. First observedv2.6.1

TDQS

A4.5/5.0
Behavior4/5

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

No annotations are provided, so the description carries the full burden, and it does substantial work: it discloses the return value (a confirmation plus color), the dual delivery mechanism (AppleScript flag index vs IMAP $MailFlagBit keywords), and the downstream effect that search-messages' flagColor filter will find colored messages. It does not address permission requirements or failure modes, which keeps 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?

Front-loaded with the 'Use when' clause and tightly organized into Use/Returns/Do-not-use/Note blocks. However the color-on-both-routes explanation is repeated almost verbatim between the description body and the color parameter's schema description, which is mild redundancy.

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 two-parameter mutation tool with no annotations, the description covers triggers, alternatives, id sourcing, return shape, and the persistence semantics of the color. An output schema exists, so return values need only cursory mention, which it provides. Only auth/permission context is absent.

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 description coverage is 50%; the color parameter is richly documented in-schema, while id has only a pattern and no prose. The description compensates by listing the palette, pointing to id sources, and explaining what the color semantically enables (cross-mailbox labeling). This adds meaning beyond the raw enum but is partly duplicated from the schema's own color description.

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 (flag) and resource (a single message, by id) with the optional color dimension called out. It explicitly names the siblings it is not — batch-flag-messages for bulk and unflag-message for removal — so an agent can distinguish it without opening a 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?

Uses an explicit 'Use when' / 'Do not use when' structure, names both alternative tools and the condition that selects each, and even supplies the prerequisite for obtaining the id (search-messages or list-messages). Nothing is left to inference.

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