Skip to main content
Glama

Flag Email

flag_email
Destructive

Flags an email in the Mac's Apple Mail (Mail.app) with a color, or clears its flag. color is one of red, orange, yellow, green, blue, purple, gray, or none to clear (default red). The answer is what Mail reads back after the change. Pass account= and mailbox= (from list_emails/search_emails) so the message is found without scanning.

Input Schema

NameRequiredDescriptionDefault
colorNored, orange, yellow, green, blue, purple, gray, or none to clear the flag. Default red.
accountNoMail.app account the message lives in (returned alongside the id). Pass it so the message is found in the right account.
confirmNoIgnored; kept for older clients.false
mailboxNoFolder the message is in. Passing it skips searching the other folders.
message_idYesThe message id returned by list_emails or search_emails. Accepts the bare id or the <angle-bracketed> form.

Output Schema

NameRequiredDescriptionDefault
colorNonull when the flag was cleared.
flaggedNo
warningNo
flag_indexNoMail's flag index, 0-6; -1 when not flagged.
message_idNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / confirm / description
      Previous value: -"Set to true to actually flag the message. Defaults to false."New value: +"Ignored; kept for older clients."
  2. Added

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false and destructiveHint=true, so the mutation risk is known. The description adds value beyond that by explaining the default (red), that 'none' clears rather than sets, and that the result is what Mail reads back after the change, which tells the agent the change is confirmed post-write rather than fire-and-forget.

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?

Three tight sentences, front-loaded with the operation and scope, followed by parameter sourcing. The 'answer is what Mail reads back' sentence is slightly wasted given an output schema exists, but it is short and not harmful.

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?

Annotations cover safety and an output schema covers return values, so the description only needs to explain the operation and lookup strategy, which it does. Minor gap: no guidance on what happens if the message id or account is wrong (fallback scan behavior, error shape).

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 color enum values, the default, and the mailbox/account meanings are already documented. The description largely restates those and only adds the sourcing hint (ids come from list_emails/search_emails) and the scanning-avoidance rationale, which the schema already mentions for mailbox. Baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('flags an email in the Mac's Apple Mail') and covers the inverse operation (clearing with color=none). The Mail.app scoping implicitly separates it from the m365/proton/thunderbird email siblings, but no sibling is named, so an agent must infer the platform distinction.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives concrete invocation guidance: pass account=/mailbox= sourced from list_emails/search_emails so the message is found without scanning. It does not state when to prefer this over other email tools or what to do if the id is unknown, but the platform scoping plus the data-source hint covers the practical decision.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources