Skip to content

feat: add remove_issue_reaction, remove_issue_comment_reaction and remove_pull_request_review_comment_reaction tools to the granular issues and pull requests toolsets - #3285

Merged
RossTarrant merged 3 commits into
github:mainfrom
timrogers:feat/remove-reaction-tools
Sep 16, 2026
Merged

RossTarrant merged 3 commits into
github:mainfrom
timrogers:feat/remove-reaction-tools

Conversation

@timrogers

Copy link
Copy Markdown
Contributor

Summary

Adds granular MCP tools for removing reactions from issues or pull requests, issue or pull request comments, and pull request review comments.

Why

The granular toolsets can add reactions but previously had no matching way to remove them, leaving agents unable to undo an accidental or outdated reaction.

What changed

  • Added remove_issue_reaction and remove_issue_comment_reaction to the granular issues toolset.
  • Added remove_pull_request_review_comment_reaction to the granular pull requests toolset.
  • Added destructive annotations, GitHub DELETE endpoint handling, toolset and handler tests, toolsnaps, and generated feature-flag documentation.

MCP impact

  • No tool or API changes
  • Tool schema or behavior changed
  • New tool added

Each new tool mirrors its add-reaction counterpart and accepts the target identifier plus the reaction_id returned when a reaction is created.

Prompts tested (tool changes only)

  • "Remove reaction 12345 from issue [docker] build arm64 #42 in owner/repo" — removes an issue or pull request reaction.
  • "Remove reaction 67890 from issue comment 999 in owner/repo" — removes an issue or pull request comment reaction.
  • "Remove reaction 54321 from pull request review comment 888 in owner/repo" — removes a review-comment reaction.

Security / limits

  • No security or limits impact
  • Auth / permissions considered
  • Data exposure, filtering, or token/size limits considered

The tools retain the same repo scope and granular feature gating as their add counterparts. They are explicitly marked destructive because they delete reactions; GitHub enforces ownership and repository permissions.

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

  • Linted locally with ./script/lint
  • Tested locally with ./script/test

Docs

  • Not needed
  • Updated (README / docs / examples)

Add granular tools for removing reactions from issues, issue comments, and pull request review comments, with destructive annotations, tests, snapshots, and generated documentation.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 9acf9c83-49aa-41af-a42d-ad75de34d132
Copilot AI balanced review requested due to automatic review settings September 15, 2026 16:17
@timrogers
timrogers requested a review from a team as a code owner September 15, 2026 16:17
@timrogers timrogers changed the title feat: add reaction removal tools feat: add remove_issue_reaction, remove_issue_comment_reaction and remove_pull_request_review_comment_reaction tools to the granular issues and pull requests toolsets Sep 15, 2026

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 review overview

🟡 Changes recommended

All three handlers leak response bodies when GitHub returns API errors.

Get a fresh assessment by requesting another Copilot review.

Review tier: Balanced
Findings: 2 Medium severity

Open (2)
What changed in this PR

Adds granular MCP tools to remove reactions from issues, comments, and pull request review comments.

Changes:

  • Registers three destructive reaction-removal tools.
  • Adds DELETE handlers, tests, and schema snapshots.
  • Updates generated feature-flag documentation.
File Description
pkg/​github/​tools.go Registers the new tools.
pkg/​github/​issues_granular.go Implements issue and comment removal.
pkg/​github/​pullrequests_granular.go Implements review-comment removal.
pkg/​github/​helper_test.go Adds mock DELETE endpoints.
pkg/​github/​granular_tools_test.go Tests registration and handlers.
pkg/​github/​__toolsnaps__/​remove_issue_reaction.snap Snapshots issue tool schema.
pkg/​github/​__toolsnaps__/​remove_issue_comment_reaction.snap Snapshots comment tool schema.
pkg/​github/​__toolsnaps__/​remove_pull_request_review_comment_reaction.snap Snapshots review-comment schema.
docs/​feature-flags.md Documents the new tools.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread pkg/github/issues_granular.go Outdated
Comment thread pkg/github/pullrequests_granular.go Outdated
Register nil-safe response body cleanup before handling go-github errors for all reaction removal tools, and cover every API-error path.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 9acf9c83-49aa-41af-a42d-ad75de34d132
@RossTarrant
RossTarrant merged commit 85598ba into github:main Sep 16, 2026
13 checks passed
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.

3 participants