Skip to main content
Glama

Flag an email

flag_message
Idempotent

Adds (flagged=true) or removes (flagged=false) the follow-up flag on an email: the star on Gmail, the flag in other mail apps.

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": {
      "accountId": "<accountId>",
      "uid": "<uid>"
    },
    "name": "flag_message"
  }
}

Input Schema

NameRequiredDescriptionDefault
uidYesIMAP UID of the message, as returned by search and listing tools.
folderNoIMAP folder containing the message. Defaults to INBOX.INBOX
flaggedNotrue to flag, false to remove the flag.
accountIdYesAccount id, as returned by list_accounts.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare idempotentHint=true, destructiveHint=false, and readOnlyHint=false, so the safety profile is covered. The description adds what actually changes (a reversible follow-up marker, not content) and implies the operation is symmetric and undoable by passing false, which is useful context for a mutating tool. It does not mention error behavior for unknown UIDs or missing folders, 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.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single sentence with the operation front-loaded and the parameter-value mapping embedded inline; every clause carries information and nothing is repeated from the schema.

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 4-parameter, fully documented-schema mutation tool with no output schema, the description covers what the operation does, both directions, and the user-visible effect. Remaining gaps (failure modes for bad UID/folder, whether the response reports the new state) are minor given the rich annotations and schema descriptions.

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, and the description genuinely adds meaning: it explains that flagged is a two-way switch (true sets, false clears) and maps it to the visible star/flag in mail clients. That is semantic value beyond the schema's terse 'true to flag, false to remove the flag', even if folder and uid handling are left entirely to the schema.

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 (adds/removes) and resource (the follow-up flag on an email), and even disambiguates the platform-specific rendering (Gmail star vs. flag in other apps). It is clear what the tool does, though it never contrasts itself with siblings like archive_message or trash_message that also mutate message state.

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

Usage Guidelines3/5

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

Usage is implied by the notion of a 'follow-up flag' — an agent can infer this is for marking messages for later attention, not for archiving or deleting. But there is no explicit when-to-use or when-not-to-use statement, and given siblings such as archive_message and move_message exist, an explicit contrast would have been valuable.

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