Add reaction tools for issues and pull requests#2732
Open
timrogers wants to merge 5 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds three new MCP write tools that let clients create emoji reactions on GitHub issues, issue comments, and pull request review comments, extending the server’s “write” surface area to cover a core GitHub interaction.
Changes:
- Added three new tools:
add_issue_reaction,add_issue_comment_reaction, andadd_pull_request_review_comment_reaction. - Wired the tools into the global tool inventory and added handler tests with mocked HTTP endpoints.
- Updated generated documentation and added new tool schema snapshots (
__toolsnaps__).
Show a summary per file
| File | Description |
|---|---|
| README.md | Documents the three new tools and their parameters in the generated tool listing. |
| pkg/github/tools.go | Registers the three new tools in AllTools so they’re available to clients. |
| pkg/github/issues_granular.go | Implements add_issue_reaction and add_issue_comment_reaction tool schemas and handlers. |
| pkg/github/pullrequests_granular.go | Implements add_pull_request_review_comment_reaction tool schema and handler. |
| pkg/github/helper_test.go | Adds mocked endpoint patterns for the reactions REST endpoints. |
| pkg/github/granular_tools_test.go | Adds toolsnap coverage and handler tests for the new reaction tools. |
| pkg/github/toolsnaps/add_issue_reaction.snap | New snapshot for add_issue_reaction tool schema. |
| pkg/github/toolsnaps/add_issue_comment_reaction.snap | New snapshot for add_issue_comment_reaction tool schema. |
| pkg/github/toolsnaps/add_pull_request_review_comment_reaction.snap | New snapshot for add_pull_request_review_comment_reaction tool schema. |
Copilot's findings
- Files reviewed: 9/9 changed files
- Comments generated: 3
Implement three granular-only tools for adding emoji reactions: - add_issue_reaction: Add reaction to an issue - add_issue_comment_reaction: Add reaction to an issue comment - add_pull_request_review_comment_reaction: Add reaction to a PR review comment All tools are feature-flagged with FeatureFlagEnable set to enable them only when clients request granular toolsets. Tools use go-github's Reactions service and return minimal ID response on success (HTTP 201). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Remove feature flag gates from reaction tools so they're available to all clients regardless of granular toolset preference. Reaction tools are naturally atomic operations and work equally well in both modes. Updates test expectations to exclude reaction tools from granular-only test assertions, since they're now always available. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
44c2a5e to
94c6f2c
Compare
Contributor
Author
|
Tested manually locally and this is all working. We could consider adding tools to remove reactions, but I think this is a good incremental step and we can choose to add more later. |
Return reaction URLs in minimal responses and clarify issue tools apply to pull requests where applicable. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
A-Georgiou
approved these changes
Jun 19, 2026
phillipschandler19-web
left a comment
There was a problem hiding this comment.
internal/ghmcp/server_test.go.github/actions/build-ui/action.ymlREADME.mdhttps://github.com/modelcontextprotocol/modelcontextprotocol/issues/1489
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
Add three new MCP tools that allow clients to add emoji reactions to GitHub issues, issue comments, and pull request review comments. These tools are available in both granular and non-granular modes.
Why
Reactions are a fundamental part of GitHub's interaction model. Clients should be able to add reactions programmatically just as they can create issues, comments, and reviews. This enables workflows where tools can express sentiment or acknowledgment on existing content.
What changed
add_issue_reactiontool: Add a reaction to an issueadd_issue_comment_reactiontool: Add a reaction to an issue commentadd_pull_request_review_comment_reactiontool: Add a reaction to a pull request review commentImplementation details:
Verification performed:
MCP impact
Prompts tested (tool changes only)
Security / limits
Tool renaming
Lint & tests
./script/lint./script/testDocs
script/generate-docspkg/github/__toolsnaps__/