Skip to main content
Glama
YimingYAN

gmail-labels-mcp-server

by YimingYAN

Modify Labels on a Gmail Thread

gmail_modify_thread_labels

Add or remove labels on all messages in a Gmail thread at once, using thread ID and label IDs for consistent updates.

Instructions

Add or remove labels on all messages in a Gmail thread at once.

Args:

  • thread_id (string): The Gmail thread ID

  • add_label_ids (string[]): Label IDs to add to all messages in the thread

  • remove_label_ids (string[]): Label IDs to remove from all messages in the thread

Returns: Updated thread with message count and affected message IDs.

Examples:

  • Use when: "Label this entire conversation as 'Compliance'"

  • Use when: "Archive this thread" -> remove_label_ids: ["INBOX"]

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
thread_idYesGmail thread ID
add_label_idsNoLabel IDs to add to all messages in the thread
remove_label_idsNoLabel IDs to remove from all messages in the thread
Behavior4/5

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

The description discloses the scope ('all messages in a Gmail thread at once'), the return format ('Updated thread with message count and affected message IDs'), and implies a mutation operation. Annotations already declare readOnlyHint=false, idempotentHint=false, and destructiveHint=false, and the description adds context without contradicting them. It does not cover edge cases, but overall adds useful behavioral detail.

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 concise and well-structured with sections for the summary, Args, Returns, and Examples. It is front-loaded with the core purpose and avoids unnecessary verbiage. Every sentence earns its place.

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 3-parameter mutation tool with annotations and no output schema, the description covers purpose, parameters, return value, and usage examples. It is complete enough for an agent to select and invoke the tool correctly. The lack of edge-case details is acceptable given the simplicity and the provided structured data.

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%, and the description repeats the parameter meanings. The added example for remove_label_ids ('Archive this thread') gives practical semantics beyond the schema's bare definitions, making the tool more intuitive. Baseline is 3, and the example raises it to 4.

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 the tool's function: 'Add or remove labels on all messages in a Gmail thread at once.' The verb 'Add or remove' and specific resource 'labels on all messages in a Gmail thread' is explicit. The title and description distinguish this from sibling tools like gmail_modify_message_labels by emphasizing the thread-level scope.

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 provides concrete 'Use when' examples, such as 'Label this entire conversation as Compliance' and 'Archive this thread' with remove_label_ids: ['INBOX']. This offers clear context for when to use the tool, but it does not explicitly mention alternatives or state 'when not to use', leaving a slight gap.

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/YimingYAN/gmail-labels-mcp-server'

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