Skip to main content
Glama

label_thread

Idempotent

Add labels to one or more email threads, including future messages, to organize, archive, mark read, or star them. Supports system and user labels with reversible changes.

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).

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": {
      "threadId": "<threadId>",
      "labelIds": "<labelIds>"
    },
    "name": "label_thread"
  }
}

Input Schema

NameRequiredDescriptionDefault
labelIdsYes
threadIdYes
createMissingNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.12.3
    • changedOutput schema / (root)
      Previous value: -{
      -  "properties": {
      -    "result": {
      -      "title": "Result",
      -      "type": "string"
      -    }
      -  },
      -  "required": [
      -    "result"
      -  ],
      -  "title": "label_threadOutput",
      -  "type": "object"
      -}New value: +null
  2. First observedv0.1.0

TDQS

A5/5.0
Behavior5/5

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

Beyond annotations, the description discloses reversibility, no confirmation requirement, the 100-item limit, future-message effects, and createMissing error behavior. These are material behavioral details for an idempotent but mutating 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 dense but front-loaded: it states the action and scope first, then label semantics and operational notes, followed by compact argument definitions. Every sentence contributes useful information.

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 three-parameter mutation tool with no output schema, the definition covers purpose, exclusions, label forms, reversibility, limits, and parameter behavior. An agent has enough context to invoke it correctly without further documentation.

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%, but the description compensates by explaining threadId as a single ID or list, labelIds as IDs or exact names, and createMissing as default false with an error otherwise. This adds precise meaning the schema does not provide.

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 states a specific verb and resource: adding labels to a whole thread or list of threads, with the important scope note that future messages are included. This distinguishes it from sibling tools such as label_message and unlabel_thread without requiring schema inspection.

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?

It gives explicit operational mappings (archive = unlabel INBOX, mark read = unlabel UNREAD, star = label STARRED), names exclusions (spam, sent, drafts never), and points to list_labels for user label IDs. The whole-thread scope also implicitly differentiates it from single-message labeling.

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