Skip to main content
Glama

Flag emails

flag_email
Idempotent

Flag messages - the same star/flag marker Outlook and webmail show, and the state search_emails's flagged filter finds. A marker for the user's own attention: flagging does not move the messages or mark them read. Pass the whole set in ONE call. Verified rather than assumed: the flags are read back off the server, so a message that could not be changed is named individually instead of being folded into a success. A uid only means something in the folder it came from, so pass mailbox when the uids did not come from INBOX. Flagging a message that is already flagged changes nothing and is not an error. unflag_email clears it.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
uidsYesThe UIDs to act on, from list_emails, search_emails or select_emails. Pass EVERY message you want changed in ONE call - this tool acts on the whole set in a single operation, and doing it that way costs the user one call instead of one per message. Up to 500 at a time. A single message is simply a one-element array.
mailboxNoIMAP folder name. Defaults to INBOX.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / uids / description
      Previous value: -"The UIDs to act on, from list_emails or search_emails. Pass EVERY message you want changed in ONE call - this tool acts on the whole set in a single operation, and doing it that way costs the user one call instead of one per message. Up to 500 at a time. A single message is simply a one-element array."New value: +"The UIDs to act on, from list_emails, search_emails or select_emails. Pass EVERY message you want changed in ONE call - this tool acts on the whole set in a single operation, and doing it that way costs the user one call instead of one per message. Up to 500 at a time. A single message is simply a one-element array."
  2. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Goes well beyond the annotations (readOnlyHint=false, idempotentHint=true, destructiveHint=false) by stating flagging does not move or mark messages read, that flags are verified by reading back off the server with per-message failure naming, and the idempotency behavior. This is rich, non-obvious behavioral context.

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 core purpose and packed with useful detail, but slightly dense and somewhat repetitive (idempotency is stated both explicitly and echoed by the annotation). Every sentence still carries substantive information.

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 2-parameter, no-output-schema state-mutation tool, the description covers purpose, invocation batching, folder scoping, verification behavior, idempotency, and the clearing alternative. Nothing an agent needs to call it correctly is missing.

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 100%, so the baseline is 3, but the description adds real meaning: a uid only means something in its originating folder, and `mailbox` should be passed when uids did not come from INBOX. That scoping rule is not derivable from the schema alone.

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+resource ('Flag messages') and immediately anchors it to a recognizable mental model ('the same star/flag marker Outlook and webmail show'). It also ties the state to a sibling's filter (search_emails's `flagged`), making it easy to distinguish from other mail-state 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?

Gives explicit invocation guidance ('Pass the whole set in ONE call'), the mailbox-selection condition ('pass `mailbox` when the uids did not come from INBOX'), and names the clearing alternative ('unflag_email clears it'). When-to-use is grounded in 'the user's own attention' marker semantics.

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