Skip to main content
Glama
YimingYAN

gmail-labels-mcp-server

by YimingYAN

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
GOOGLE_CLIENT_IDYesOAuth2 client ID from Google Cloud Console
GOOGLE_CLIENT_SECRETYesOAuth2 client secret from Google Cloud Console

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
gmail_list_labelsA

List all labels (tags) in the Gmail account.

Returns both system labels (INBOX, SENT, TRASH, etc.) and user-created labels. Use this to find label IDs needed for add/remove operations.

Returns: List of labels with their IDs, names, types, and message counts.

Examples:

  • Use when: "Show me all my Gmail labels"

  • Use when: "What label ID does 'Finance' have?"

gmail_create_labelA

Create a new user label (tag) in Gmail.

Args:

  • name (string): Label name. Supports nesting with "/" (e.g., "Finance/Invoices")

Returns: The created label with its ID, name, and visibility settings.

Examples:

  • Use when: "Create a label called 'Compliance'"

  • Use when: "Add a new Gmail tag 'Projects/Alpha'"

gmail_delete_labelA

Delete a user-created label from Gmail. System labels cannot be deleted.

Args:

  • label_id (string): The label ID to delete (use gmail_list_labels to find IDs)

Note: Deleting a label removes it from all messages but does not delete the messages.

Examples:

  • Use when: "Delete the label with ID Label_123"

  • Use when: "Remove the 'OldProject' label"

gmail_modify_message_labelsA

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"]

gmail_modify_thread_labelsA

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"]

gmail_get_message_labelsA

Retrieve the current labels on a specific Gmail message.

Args:

  • message_id (string): The Gmail message ID

Returns: Message metadata including subject, snippet, and current label IDs.

Examples:

  • Use when: "What labels does message abc123 have?"

  • Use when: "Is message abc123 starred?"

gmail_bulk_label_by_searchA

Search Gmail messages using a query and apply label changes to all matching messages.

Args:

  • query (string): Gmail search query (same syntax as Gmail search box)

  • add_label_ids (string[]): Label IDs to add to all matching messages

  • remove_label_ids (string[]): Label IDs to remove from all matching messages

  • max_results (number): Max messages to process (default: 20, max: 100)

Common query examples:

  • "from:sender@example.com" - emails from a sender

  • "subject:invoice" - emails with 'invoice' in subject

  • "is:unread" - unread emails

  • "after:2024/01/01 before:2024/12/31" - date range

Returns: Count of messages updated and their IDs.

Examples:

  • Use when: "Label all emails from compliance@firm.com as 'Compliance'"

  • Use when: "Archive all emails with subject 'Newsletter'"

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A4.4/5.0

Scored across 7 tools

Disambiguation5/5

Each tool targets a distinct resource and action: label CRUD, message label operations, thread label operations, and bulk search modifications. There is no overlap between tools; even the three modifying tools differ by scope (single message, single thread, bulk search).

Naming Consistency5/5

All tool names follow a consistent gmail_ prefix with a verb_noun pattern (e.g., list_labels, create_label, modify_message_labels). Even 'bulk_label_by_search' uses a clear action-object-modifier structure. The naming is uniform and predictable.

Tool Count5/5

Seven tools is well-scoped for a Gmail label management server. It covers label administration and all common ways to apply/remove labels without excess overlap or missing essentials. The set feels neither sparse nor bloated.

Completeness4/5

The tool set provides label CRUD (list, create, delete) and comprehensive label modification via message, thread, and bulk search. The only notable gap is the lack of an update/rename label operation, which is a minor omission that agents can work around by creating a new label and migrating.

Maintenance

ActivityInactive
ResponsivenessNo issues