Skip to main content
Glama

modify_message_labels

Destructive

Add and/or remove labels on one Gmail message in a single call (e.g. add STARRED, remove UNREAD). Pass label ids from list_labels (system labels like STARRED/IMPORTANT/UNREAD/TRASH work directly by name). Pass account when more than one Gmail account is connected (see list_accounts). Needs gmail.modify — accounts connected before this feature get a reconnect hint. This actually changes the mailbox — confirm with the user before calling for anything beyond routine triage.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
accountNoAccount label the message belongs to. Required when several Gmail accounts are connected.
message_idYesGmail message id (from get_thread's messages, or a label/draft result).
add_label_idsNoLabel ids to add (see list_labels for ids; system labels like STARRED/IMPORTANT/UNREAD also work).
remove_label_idsNoLabel ids to remove.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Annotations only supply destructiveHint=true; the description goes well beyond that by disclosing the required gmail.modify scope, a reconnect hint for accounts connected before the feature existed, and the fact that this actually mutates the mailbox and warrants user confirmation for non-routine changes. That is meaningful behavioral context an agent cannot get from 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.

Conciseness4/5

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

Four tight sentences that lead with the core action and example, then stack prerequisites and the confirmation warning. No filler, though the paragraph is dense enough that the confirmation caveat could be visually separated.

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 destructive mutation with no output schema, the description covers everything an agent needs: the effect, the auth scope, the account-selection rule, label id sourcing, and the user-confirmation requirement. Nothing material is left for the agent to guess.

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. The description adds value on top by clarifying that system labels (STARRED/IMPORTANT/UNREAD/TRASH) can be passed by name and that label ids come from list_labels, plus restating the multi-account condition for `account`.

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?

The description states a specific verb pair and resource: 'Add and/or remove labels on one Gmail message in a single call', with a concrete example (add STARRED, remove UNREAD). The 'one Gmail message' scope implicitly separates it from the thread-level sibling, but it never names modify_thread_labels or organize_messages, so the agent must infer the boundary.

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?

It gives real selection context: pass `account` when multiple Gmail accounts are connected, use label ids from list_labels, and confirm with the user before anything beyond routine triage. It stops short of explicitly naming alternative tools (modify_thread_labels, organize_messages) or stating when a different tool is the better choice.

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