Skip to main content
Glama

label_thread

Adds labels to every message in a Gmail thread by thread ID, enabling whole-conversation labeling in one call.

Instructions

Add labels to EVERY message in a conversation (users.threads.modify), which is what Gmail's UI does when you label a thread. Use this rather than label_messages whenever you have a Thread ID and mean the whole conversation. Reversible with unlabel_thread.

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": {
      "account": "<account>",
      "thread_id": "<thread_id>",
      "label_ids": "<label_ids>"
    },
    "name": "label_thread"
  }
}

Input Schema

NameRequiredDescriptionDefault
accountYesAccount id ("personal", "tamu").
label_idsYesLabel IDs (from get_labels) to add to every message in the thread.
thread_idYesGmail thread id.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.6.2

TDQS

A4.6/5.0
Behavior4/5

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

Annotations only declare readOnlyHint=false and destructiveHint=false; the description adds the important behavior that the operation fans out to EVERY message in the thread and that it is reversible via unlabel_thread. It does not cover idempotency (what happens if the label is already present) or permission requirements, which keeps 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?

Three short sentences, front-loaded with the scope-defining claim, then the sibling routing rule, then reversibility. No filler or restatement of the tool name.

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?

Covers purpose, alternative selection, and reversibility for a 3-parameter mutation with no output schema; annotations and full schema coverage handle the rest. Only edge-case behavior (duplicate labels, partial failures) is unaddressed, which is minor here.

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 about thread_id (it identifies a whole conversation, not a single message) and about what label_ids does at thread scope. That is useful disambiguation beyond the schema text.

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 and resource (add labels to every message in a conversation), names the underlying API (users.threads.modify), and explicitly distinguishes itself from the sibling label_messages by scope (whole thread vs. individual messages).

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 an explicit selection rule: use this rather than label_messages when you have a Thread ID and mean the whole conversation. It also names unlabel_thread as the inverse operation, so the agent knows both directions.

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