Skip to main content
Glama

unlabel_thread

Idempotent

Remove labels from one or more entire email threads to archive, mark as read, or reorganize them reversibly in Gmail.

Instructions

Remove labels from a whole thread (or from a list of threads). 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 remove (IDs or names).

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": "unlabel_thread"
  }
}

Input Schema

NameRequiredDescriptionDefault
labelIdsYes
threadIdYes

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": "unlabel_threadOutput",
      -  "type": "object"
      -}New value: +null
  2. First observedv0.1.0

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare non-destructive, idempotent and open-world; the description adds value on top: it states the operation is reversible, needs no confirmation, and caps batches at 100 items per call. It does not say what happens when a label is absent or invalid, which is the only remaining behavioral gap.

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?

Front-loaded purpose sentence followed by compact intent-to-call mappings and an args block; every clause conveys actionable information with no restatement of the name or filler.

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?

For a two-parameter mutation with no output schema, the description covers value domains, batch limits, reversibility and sibling routing. Return value and error semantics are left implicit, which is acceptable but leaves a small gap.

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 0%, so the description has to carry the load, and it largely does: labelIds accepts system IDs (INBOX, UNREAD, STARRED, IMPORTANT, CATEGORY_*), user label IDs discoverable via list_labels, or exact label names; threadId accepts a single ID or a list. Case-sensitivity and invalid-label behavior are unstated, so not a 5.

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 (remove) applied to a specific resource (labels on a whole thread or list of threads), which cleanly separates it from unlabel_message (single message) and label_thread (inverse operation). An agent can pick it from the sibling list without opening the schema.

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?

Goes well beyond 'when to use': it maps common intents to concrete calls (Archive = unlabel INBOX, mark read = unlabel UNREAD, star = label STARRED) and explicitly excludes trash_*, spam, sent and drafts, routing those to trash_thread. Both positive and negative routing guidance is present.

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