Skip to content

Conversation

@ilyakamens
Copy link

@ilyakamens ilyakamens commented Jan 21, 2026

Summary

Add a new tool that enables AI agents to reply to existing pull request comments. This tool uses GitHub's CreateCommentInReplyTo REST API to create threaded conversations on pull requests.

(Copied and updated from #723)

Why

Fixes #635

What changed

Features:

  • Reply to any existing PR comment using its ID
  • Proper error handling for missing parameters and API failures
  • Comprehensive test coverage (8 test cases)
  • Follows project patterns and conventions
  • Registered in pull_requests toolset as a write operation

Parameters:

  • owner: Repository owner (required)
  • repo: Repository name (required)
  • pullNumber: Pull request number (required)
  • commentId: ID of comment to reply to (required)
  • body: Reply text content (required)

MCP impact

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

Prompts tested (tool changes only)

Security / limits

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

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

Note: if you're renaming tools, you must add the tool aliases. For more information on how to do so, please refer to the official docs.

Lint & tests

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

Docs

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

There was a change on `main` before I changed anything
Add a new tool that allows AI agents to reply to existing pull request comments. This tool uses GitHub's CreateCommentInReplyTo REST API to create threaded conversations on pull requests.

Features:

Reply to any existing PR comment using its ID
Proper error handling for missing parameters and API failures
Comprehensive test coverage (8 test cases)
Follows project patterns and conventions
Registered in pull_requests toolset as a write operation
Parameters:

owner: Repository owner (required)
repo: Repository name (required)
pullNumber: Pull request number (required)
commentId: ID of comment to reply to (required)
body: Reply text content (required)
This tool complements the existing add_comment_to_pending_review tool by enabling responses to already-posted comments, enhancing AI-powered code review workflows.

Closes: github#635
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.

Support replying to existing PR review comments

1 participant