Skip to main content
Glama

label_thread

Idempotent

Add labels to an entire email thread, including future messages, using system or user label IDs or names; apply reversibly to one or multiple threads.

Instructions

Add labels to a whole thread (or to a list of threads), future messages included. Labels: system IDs (INBOX, UNREAD, STARRED, IMPORTANT, CATEGORY_*) or user label IDs (list_labels), or their exact names. Archive = unlabel INBOX; mark read = unlabel UNREAD; star = label STARRED. Trash: trash_*; spam, sent and drafts: never. Reversible, no confirmation needed; at most 100 items per call.

Args: threadId: thread ID, or a list of IDs. labelIds: labels to add (IDs or names). createMissing: create missing user labels (default false; otherwise an error).

Input Schema

NameRequiredDescriptionDefault
labelIdsYes
threadIdYes
createMissingNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.8/5.0
Behavior5/5

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

Beyond the annotations, it discloses that labels apply to future messages, the operation is reversible with no confirmation needed, calls are capped at 100 items, and createMissing defaults to false and errors otherwise. These details materially improve safe invocation of this mutation tool.

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?

The description is front-loaded with the core action, then supplies label semantics, operational exclusions, constraints, and an Args section. Despite covering many details, every sentence and argument note serves a clear invocation purpose.

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?

Given the mutation behavior, zero schema parameter descriptions, and available annotations, the description supplies everything an agent needs to select and invoke the tool correctly. Return-value details are unnecessary because an output schema exists.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description carries the full burden and does so well: threadId may be a single ID or list, labelIds accept system IDs, user label IDs from list_labels, or exact names, and createMissing creates missing user labels when true or errors when false. The Args section directly compensates for the undocumented schema parameters.

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?

The description uses a specific verb and resource: add labels to a whole thread or list of threads, with future messages included. It clearly distinguishes thread-level labeling from sibling message-level tools and names related operations like archive, mark read, and star through label changes.

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 provides clear operational context and exclusions: trash uses trash_* tools, while spam, sent, and drafts are explicitly not valid targets. It also explains archive/read/star as label-based effects, though it does not explicitly contrast with label_message or unlabel_thread by name.

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