Skip to main content
Glama

set_flags

Idempotent

Flag or unflag a message, and mark it read or unread. Give the message id from search_messages and at least one of "flagged" and "seen" (true to set, false to clear). Returns the message's flags afterwards. On Gmail flagged is the star, and it applies to the message under every label.

Input Schema

NameRequiredDescriptionDefault
seenNotrue to mark the message read, false to mark it unread
flaggedNotrue to flag the message, false to remove the flag
account_idYesId from list_mail_accounts
message_idYesThe message id from a search_messages row.

Output Schema

NameRequiredDescriptionDefault
idYesMessage id
seenYesWhether the message is marked read
flagsYesAll IMAP flags now on the message
flaggedYesWhether the message is flagged

Schema Changelog

Changes observed during successful MCP inspections.

No schema history has been recorded yet.

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare non-readOnly, idempotent, non-destructive, so the bar is lower; the description still adds value by stating it returns the flags afterwards and explaining Gmail-specific semantics (flag = star, applies under every label). This is genuine context beyond the structured fields.

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?

Three tight sentences: action, required inputs, return value plus platform nuance. Front-loaded and zero waste.

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?

Output schema exists and the description confirms it returns the flags afterwards, so return values need no elaboration. Inputs, constraints, and Gmail behavior are all covered for this simple mutation tool.

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 baseline is 3. The description earns more by adding a constraint not encoded in the schema: at least one of flagged/seen must be set, plus the star/label semantics of the flag.

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 specific verbs (flag/unflag, mark read/unread) against a specific resource (a message), making it trivially distinguishable from siblings like move_message and trash_message. An agent can pick it without opening the schema.

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?

Explains the prerequisite flow (get the message id from search_messages) and enforces that at least one of flagged/seen must be supplied. It does not name explicit when-not conditions or alternatives, but the operating context is clear.

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.