Uh oh!
There was an error while loading. Please reload this page.
adding labels tools - #1193
Conversation
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.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
a3c3352 to
e45da8dCompareUh oh!
There was an error while loading. Please reload this page.
* adding labels tools * fixing ci * update toolsnap * fixing lint * changing comment * fix title
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