Open
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
gmail_list_labelstool to list all Gmail labels for a user accountgmail_create_labeltool to create new Gmail labelsgmail_modify_labelstool to add/remove labels from individual messagesThese 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_labelsreturns all system and user labelsgmail_create_labelcreates a new label and returns its IDgmail_modify_labelsadds a label to a message (verified via Gmail UI)gmail_modify_labelsremoves a label from a messageUNREAD/ removingUNREADlabel works as expected