Skip to content

Add Gmail label management tools#11

Open
micgc wants to merge 1 commit intoj3k0:mainfrom
micgc:feat/gmail-label-management
Open

Add Gmail label management tools#11
micgc wants to merge 1 commit intoj3k0:mainfrom
micgc:feat/gmail-label-management

Conversation

@micgc
Copy link
Copy Markdown

@micgc micgc commented Feb 24, 2026

Summary

  • Adds gmail_list_labels tool to list all Gmail labels for a user account
  • Adds gmail_create_label tool to create new Gmail labels
  • Adds gmail_modify_labels tool to add/remove labels from individual messages

These tools use the existing Gmail API (users.labels.list, users.labels.create, users.messages.modify) and follow the same patterns as the existing tools.

Motivation

The current toolset has no way to tag or categorize emails after reading them. This makes it impossible to build workflows that track which emails have been processed (e.g. marking emails with a custom "Triaged" or automation label to avoid re-processing).

Test plan

  • gmail_list_labels returns all system and user labels
  • gmail_create_label creates a new label and returns its ID
  • gmail_modify_labels adds a label to a message (verified via Gmail UI)
  • gmail_modify_labels removes a label from a message
  • Adding UNREAD / removing UNREAD label works as expected

Adds three new MCP tools for managing Gmail labels:
- gmail_list_labels: Lists all labels for a user account
- gmail_create_label: Creates a new Gmail label
- gmail_modify_labels: Adds/removes labels from messages

This enables workflows like tagging processed emails with custom labels
(e.g. marking emails as triaged by an automation) which was previously
not possible with the existing toolset.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant