Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds comprehensive GitHub Labels tools functionality to the GitHub MCP Server, enabling users to create, read, update, and delete repository labels through dedicated tools.
- Introduces a new "labels" toolset with three core functions: get_label, list_label, and write_label
- Adds extensive test coverage for all label operations including edge cases and error scenarios
- Updates documentation to include the new labels toolset in both README and remote server documentation
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/github/tools.go | Adds ToolsetLabels metadata and integrates label tools into the default toolset group |
| pkg/github/labels.go | Implements the three main label tools with GraphQL operations for CRUD functionality |
| pkg/github/labels_test.go | Comprehensive test suite covering all label operations and error cases |
| pkg/github/toolsnaps/*.snap | Tool schema snapshots for the three label tools |
| docs/remote-server.md | Documents the new labels toolset in the remote server table |
| README.md | Updates tool documentation with labels section and individual tool descriptions |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
a3c3352 to
e45da8d
Compare
JoannaaKL
approved these changes
Oct 9, 2025
issei-m
pushed a commit
to issei-m/github-mcp-server
that referenced
this pull request
Nov 14, 2025
* adding labels tools * fixing ci * update toolsnap * fixing lint * changing comment * fix title
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.
This PR adds label management tools using a consolidated approach with GraphQL-only operations.
Resolves #312
Summary
Following the tool consolidation pattern from #1172, this PR introduces three multi-functional label management tools:
get_label- Retrieves a specific label by name from a repositorylist_label- Lists labels from a repository OR an issue (usesissue_numberparameter to switch context)write_label- Unified write operations withmethodparameter:create- Create a new label (requiresname,color)update- Update existing label (requiresname, at least one ofnew_name/color/description)delete- Delete a label (requiresname)Design Philosophy
We're moving toward consolidated, multi-functional tools that use method parameters to handle related operations, rather than creating separate tools for each action. This approach:
gettools #1172's PR consolidation)Technical Details
All operations use GraphQL exclusively (
gqlClient) for consistency and efficiency:repository.labelsandrepository.issue.labelscreateLabel,updateLabel, anddeleteLabelgetRepositoryID()andgetLabelID()support the mutations