FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

feat(pull_requests): add MCP tools for GitHub Stacked PRs (#2905) by ruhaanpathan · Pull Request #2908 · github/github-mcp-server · GitHub

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

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 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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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

jdpt0 commented Aug 25, 2026

Copy link
Copy Markdown

Thanks for working on this — native stacked-PR support would be genuinely useful for us. We use agents to maintain dependent, reviewable PRs in a monorepo and currently have to mark and resynchronise GitHub stacks manually.

I tested this branch against current main and compared it with GitHub’s published Stacked Pull Requests REST API. It looks like it now needs rebasing and some API updates:

  • It no longer compiles against the current go-github/v89 request signatures.
  • GitHub documents the request field as pull_requests, rather than pull_numbers.
  • The documented mutations are POST /stacks/{stack_number}/add and POST /stacks/{stack_number}/unstack; the current PATCH and DELETE calls don’t appear to exist.
  • The response model differs from the documented schema, including number, base.ref, and nested pull-request refs.
  • The implementation should confirm support for API version 2026-03-10.

I’d be happy to help rebase and update this. Would the author and maintainers prefer contributions to this branch, or a replacement PR preserving attribution?

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

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)

4 participants


Back | FazBrowse Home | New Git URL