Skip to content

feat(pull_requests): add MCP tools for GitHub Stacked PRs (#2905)#2908

Open
ruhaanpathan wants to merge 1 commit into
github:mainfrom
ruhaanpathan:feat/stacked-pr-tools
Open

feat(pull_requests): add MCP tools for GitHub Stacked PRs (#2905)#2908
ruhaanpathan wants to merge 1 commit into
github:mainfrom
ruhaanpathan:feat/stacked-pr-tools

Conversation

@ruhaanpathan

Copy link
Copy Markdown

Summary

Adds 5 new MCP tools (get_stack, list_stacks, link_stack, update_stack, dissolve_stack) to the pull_requests toolset 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 gh CLI access.
Fixes #2905

What changed

  • Added pkg/github/pullrequests_stacks.go implementing get_stack, list_stacks, link_stack, update_stack, and dissolve_stack.
  • Registered all 5 Stacked PR tools in pkg/github/tools.go under ToolsetMetadataPullRequests.
  • Updated generatePullRequestsToolsetInstructions in pkg/github/toolset_instructions.go with stacked PR guidance.
  • Added unit test suite in pkg/github/pullrequests_stacks_test.go.

MCP impact

  • New tool added
    Added get_stack, list_stacks, link_stack, update_stack, and dissolve_stack tools under the pull_requests toolset.

Prompts tested (tool changes only)

Security / limits

  • Auth / permissions considered
    Requires standard repo OAuth scope matching other pull request management tools.

Tool renaming

  • I am renaming tools as part of this PR (e.g. a part of a consolidation effort)
    • I have added the new tool aliases in deprecated_tool_aliases.go
  • I am not renaming tools as part of this PR

Lint & tests

  • Tested locally with ./script/test
    Added unit tests covering tool definitions, input schemas, and HTTP API execution handlers.

Docs

  • Updated (README / docs / examples)
    Updated toolset instructions for pull_requests.

@ruhaanpathan
ruhaanpathan requested a review from a team as a code owner July 19, 2026 11:28
Copilot AI review requested due to automatic review settings July 19, 2026 11:28

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

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.

Add MCP tools for GitHub Stacked PRs (gh stack link / sync / view)

3 participants