Skip to main content
Glama
YimingYAN

gmail-labels-mcp-server

by YimingYAN

Modify Labels on a Gmail Message

gmail_modify_message_labels

Add or remove labels on a specific Gmail message by ID, enabling actions like archiving, starring, or applying custom tags.

Instructions

Add or remove labels (tags) on a specific Gmail message.

Args:

  • message_id (string): The Gmail message ID

  • add_label_ids (string[]): List of label IDs to add (optional)

  • remove_label_ids (string[]): List of label IDs to remove (optional)

Use gmail_list_labels to find label IDs. Common system label IDs:

  • INBOX, STARRED, IMPORTANT, SENT, TRASH, SPAM, UNREAD, READ

Returns: Updated message with its current label IDs.

Examples:

  • Use when: "Tag message abc123 with label Label_456"

  • Use when: "Remove INBOX label from message abc123 (archive it)"

  • Use when: "Star message abc123" -> add_label_ids: ["STARRED"]

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
message_idYesGmail message ID
add_label_idsNoLabel IDs to add (e.g. ['Label_123', 'STARRED'])
remove_label_idsNoLabel IDs to remove (e.g. ['INBOX'])
Behavior4/5

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

The description discloses the return behavior ('Updated message with its current label IDs') and notes that removing the INBOX label archives the message. Annotations already indicate this is a mutating operation (readOnlyHint: false), so the added context is useful and does not contradict any annotation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with Args, Returns, and Examples sections, making it easy to scan. However, the Args section partially duplicates the schema, adding some redundancy. Overall, it is focused and every sentence carries 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?

The description is complete for a tool of this complexity: it covers purpose, parameters, return value, and common use cases. With no output schema or explicit prerequisites, the description still gives enough detail for an agent to invoke the tool correctly.

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?

Despite 100% schema description coverage, the description adds significant value by providing common system label IDs (INBOX, STARRED, etc.) and concrete examples for each parameter (e.g., 'Star message abc123' -> add_label_ids: ['STARRED']). This goes beyond the schema's basic parameter descriptions.

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 or remove labels (tags) on a specific Gmail message', which is a specific verb+resource+scope. It distinguishes from sibling tools like gmail_modify_thread_labels (modifies a thread) and gmail_bulk_label_by_search (bulk operation) by emphasizing 'specific Gmail message'.

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 usage context with 'Use gmail_list_labels to find label IDs' and multiple 'Use when' examples. It does not explicitly exclude alternatives like thread-level or bulk operations, but the examples make it clear this is for single-message label modifications.

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