feat(pull_requests): add MCP tools for GitHub Stacked PRs (#2905)#2908
Open
ruhaanpathan wants to merge 1 commit into
Open
feat(pull_requests): add MCP tools for GitHub Stacked PRs (#2905)#2908ruhaanpathan wants to merge 1 commit into
ruhaanpathan wants to merge 1 commit into
Conversation
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
Adds 5 new MCP tools (
get_stack,list_stacks,link_stack,update_stack,dissolve_stack) to thepull_requeststoolset to support native GitHub Stacked PRs.Why
Agents managing stacked/dependent PRs currently lack a first-class way to discover, create, update, and dissolve native GitHub Stacked PR objects via MCP without needing host
ghCLI access.Fixes #2905
What changed
pkg/github/pullrequests_stacks.goimplementingget_stack,list_stacks,link_stack,update_stack, anddissolve_stack.pkg/github/tools.gounderToolsetMetadataPullRequests.generatePullRequestsToolsetInstructionsinpkg/github/toolset_instructions.gowith stacked PR guidance.pkg/github/pullrequests_stacks_test.go.MCP impact
Added
get_stack,list_stacks,link_stack,update_stack, anddissolve_stacktools under thepull_requeststoolset.Prompts tested (tool changes only)
get_stack(owner, repo, stackNumber: 10)list_stacks(owner, repo)link_stack(owner, repo, pullNumbers: [101, 102], base: "main")update_stack(owner, repo, stackNumber: 10, pullNumbers: [101, 102, 103])dissolve_stack(owner, repo, stackNumber: 10)Security / limits
Requires standard
repoOAuth scope matching other pull request management tools.Tool renaming
deprecated_tool_aliases.goLint & tests
./script/testAdded unit tests covering tool definitions, input schemas, and HTTP API execution handlers.
Docs
Updated toolset instructions for
pull_requests.