Skip to main content
Glama
alexpekach

gmail-mcp-local

by alexpekach

label_thread

Add or remove labels on all messages in a Gmail thread. Archive threads, mark as read, or apply custom labels.

Instructions

Add/remove labels on every message in a thread. INBOX/STARRED/UNREAD/IMPORTANT/SPAM/TRASH or user label ids. Mark read: remove ["UNREAD"]. Archive: remove ["INBOX"]. Requires gmail.modify scope.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
accountYesA connected account ref (see list_accounts).
thread_idYes
add_label_idsNo
remove_label_idsNo
Behavior3/5

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

With no annotations, the description carries the full burden. It explains the mutating effect (add/remove labels) and scope requirements, but lacks details on idempotency, error handling, or whether the operation is atomic. The examples help but do not fully disclose behavior like what happens if the thread is not found.

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 two sentences with a bullet-like list of examples. Every sentence adds value: action, examples, common operations, and scope requirement. No wasted words, front-loaded with core purpose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of output schema and low schema coverage, the description provides adequate context for typical use but omits return value details, error conditions, and full parameter semantics (e.g., thread_id format). The examples are helpful, but a complete description would mention response structure or success confirmation.

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 only 25% (only 'account' described). The description compensates by explaining that 'add_label_ids' and 'remove_label_ids' accept system labels (INBOX, STARRED, etc.) or user label ids, and gives concrete mappings (remove UNREAD = mark read). However, 'thread_id' format is not clarified, and the description could elaborate on valid label id formats.

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 clearly states 'Add/remove labels on every message in a thread', specifying the verb and resource. It provides concrete examples like system labels (INBOX, STARRED) and actions (mark read: remove UNREAD). This directly distinguishes it from sibling 'label_message' which acts on a single message, making purpose unambiguous.

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?

The description includes a prerequisite ('Requires gmail.modify scope') and demonstrates common use cases (mark read, archive). It implies when to use this tool (thread-level labeling) versus alternatives like 'label_message' for single messages, but does not explicitly state when not to use it or list alternatives.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/alexpekach/gmail-mcp-local'

If you have feedback or need assistance with the MCP directory API, please join our Discord server