Skip to main content
Glama

modify_message_labels

Add or remove labels on one Gmail message to archive, mark read, star, or categorize it, and return the updated label IDs.

Instructions

Add or remove labels on one message and return its updated {id,threadId,labelIds}. Archive by removing INBOX, mark read by removing UNREAD, star by adding STARRED. Labels must already exist; get IDs from list_labels. Reversible by the opposite call; repeating the same change is harmless. Do not list a label in both arrays.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
accountYesAccount alias from list_accounts; selects which mailbox to use.
messageIdYesGmail message ID to relabel.
addLabelIdsNoLabel IDs to add, e.g. ["STARRED"] or a user label ID from list_labels.
removeLabelIdsNoLabel IDs to remove, e.g. ["INBOX"] to archive or ["UNREAD"] to mark read.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • addedInput schema / properties / account / description
      Added value: +"Account alias from list_accounts; selects which mailbox to use."
    • addedInput schema / properties / addLabelIds / description
      Added value: +"Label IDs to add, e.g. [\"STARRED\"] or a user label ID from list_labels."
    • addedInput schema / properties / messageId / description
      Added value: +"Gmail message ID to relabel."
    • addedInput schema / properties / removeLabelIds / description
      Added value: +"Label IDs to remove, e.g. [\"INBOX\"] to archive or [\"UNREAD\"] to mark read."
  2. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Adds substantial context beyond the annotations: it declares the return value {id,threadId,labelIds}, notes reversibility via the opposite call, and states that labels must pre-exist. The only minor tension is that 'repeating the same change is harmless' reads as idempotent while idempotentHint=false, but 'harmless' is a weaker claim than 'idempotent' and does not amount to a contradiction.

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?

Four tight sentences, front-loaded with the operation and return shape, then the intent shortcuts, prerequisites, and constraints. Nothing is padding.

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?

There is no output schema, and the description compensates by naming the returned fields. For a 4-parameter mutation tool with full annotation coverage, everything an agent needs to call it correctly is present.

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 goes beyond it by explaining what the label vectors mean operationally and by adding the cross-array constraint ('Do not list a label in both arrays') that the schema does not encode.

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 (add/remove) and resource (labels on one message) plus the return shape. An agent can distinguish it from list_labels and get_message immediately.

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 concrete intent mappings (remove INBOX to archive, remove UNREAD to mark read, add STARRED to star), the prerequisite that labels must exist, and where to get IDs (list_labels). No inference required.

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