Title: feat: add `list_pull_request_review_threads` tool to expose PRRT_ node IDs for resolving threads · Issue #2229 · github/github-mcp-server · GitHub
Open Graph Title: feat: add `list_pull_request_review_threads` tool to expose PRRT_ node IDs for resolving threads · Issue #2229 · github/github-mcp-server
X Title: feat: add `list_pull_request_review_threads` tool to expose PRRT_ node IDs for resolving threads · Issue #2229 · github/github-mcp-server
Description: Problem resolve_pull_request_review_thread requires a thread node ID in PRRT_xxx format. However, this ID is not returned by any existing REST-based MCP tool — it is only obtainable via the GraphQL API. Currently there is no way to compl...
Open Graph Description: Problem resolve_pull_request_review_thread requires a thread node ID in PRRT_xxx format. However, this ID is not returned by any existing REST-based MCP tool — it is only obtainable via the GraphQL...
X Description: Problem resolve_pull_request_review_thread requires a thread node ID in PRRT_xxx format. However, this ID is not returned by any existing REST-based MCP tool — it is only obtainable via the GraphQL...
Opengraph URL: https://github.com/github/github-mcp-server/issues/2229
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"feat: add `list_pull_request_review_threads` tool to expose PRRT_ node IDs for resolving threads","articleBody":"## Problem\n\n`resolve_pull_request_review_thread` requires a thread node ID in `PRRT_xxx` format. However, this ID is **not returned by any existing REST-based MCP tool** — it is only obtainable via the GraphQL API.\n\nCurrently there is no way to complete the \"list unresolved threads → resolve them\" flow using the MCP tools alone, because there is no tool to retrieve the `PRRT_xxx` node IDs needed by `resolve_pull_request_review_thread`.\n\n## Proposed Solution\n\nAdd a `list_pull_request_review_threads` tool that uses the existing `githubv4` GraphQL client (already a dependency) to query review threads and return their node IDs.\n\n### Tool Definition\n\n**Name:** `list_pull_request_review_threads`\n\n**Input:**\n| Parameter | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `owner` | string | ✅ | Repository owner |\n| `repo` | string | ✅ | Repository name |\n| `pull_number` | integer | ✅ | Pull request number |\n| `is_resolved` | boolean | ❌ | Filter by resolution status. Omit to return all threads. |\n\n**Output (per thread):**\n| Field | Type | Description |\n|-------|------|-------------|\n| `id` | string | Node ID in `PRRT_xxx` format — required for `resolve_pull_request_review_thread` |\n| `isResolved` | boolean | Whether the thread has been resolved |\n| `isOutdated` | boolean | Whether the thread is outdated (code changed after the comment) |\n| `path` | string | File path the thread is on |\n| `line` | integer | End line number |\n| `startLine` | integer | Start line number |\n| `firstComment.body` | string | Body of the first comment in the thread |\n| `firstComment.author` | string | Login of the commenter |\n| `firstComment.createdAt` | string | ISO 8601 timestamp |\n\n**Response envelope:**\n```json\n{\n \"threads\": [...],\n \"totalCount\": 4,\n \"truncated\": false\n}\n```\n\n### Suggested GraphQL Query\n\n```graphql\nquery($owner: String!, $repo: String!, $number: Int!) {\n repository(owner: $owner, name: $repo) {\n pullRequest(number: $number) {\n reviewThreads(first: 100) {\n totalCount\n nodes {\n id\n isResolved\n isOutdated\n path\n line\n startLine\n comments(first: 1) {\n nodes {\n body\n author { login }\n createdAt\n }\n }\n }\n }\n }\n }\n}\n```\n\n### Registration\n\nWould fit naturally in `AllTools()` in `pkg/github/tools.go`, alongside the existing `resolve_pull_request_review_thread` tool in `ToolsetMetadataPullRequests`.\n\n## Use Case / Motivation\n\nThe intended workflow is:\n\n```\nlist_pull_request_review_threads(owner, repo, pull_number, is_resolved=false)\n → returns [{ id: \"PRRT_kwDO...\", ... }, ...]\n\nresolve_pull_request_review_thread(threadId: \"PRRT_kwDO...\")\n → marks thread as resolved\n```\n\nWithout `list_pull_request_review_threads`, an AI agent has no way to obtain the `PRRT_xxx` ID, making `resolve_pull_request_review_thread` effectively unusable from an MCP context.\n\n## Validation\n\nWe implemented this tool as a local patch against the current `main` branch and validated the end-to-end flow:\n\n- Tool appears in the MCP tool list ✅\n- Returns `PRRT_xxx` node IDs correctly ✅\n- `is_resolved=false` filter works as expected ✅\n- Returned IDs successfully used with `resolve_pull_request_review_thread` to resolve all 4 unresolved threads in a live PR ✅\n\nThe patch implementation is available at: \nhttps://github.com/scottlz0310/Mcp-Docker/blob/main/patches/github/list_pr_review_threads.go\n\n## Additional Notes\n\n- No new dependencies required — uses the existing `github.com/shurcooL/githubv4` client\n- `is_resolved` uses a 3-value pattern (nil = all, true = resolved only, false = unresolved only) consistent with similar optional boolean filters in the codebase\n- Type names chosen to avoid collision with existing `reviewThreadsQuery` / `reviewThreadNode` types in `pullrequests.go`\n\nHappy to submit a PR if this direction looks good to the maintainers.\n","author":{"url":"https://github.com/scottlz0310-user","@type":"Person","name":"scottlz0310-user"},"datePublished":"2026-03-17T12:23:48.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":12},"url":"https://github.com/2229/github-mcp-server/issues/2229"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:8ae1eeb3-9304-7a29-2573-151d3e37c4c2 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B2F8:3D7E1E:FFDB3:177B2A:6A61DD2D |
| html-safe-nonce | cfd8507c462faf4d22859719b64abfd2a988516d33fe366aeb44c8f8ba548814 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMkY4OjNEN0UxRTpGRkRCMzoxNzdCMkE6NkE2MUREMkQiLCJ2aXNpdG9yX2lkIjoiNTUwMjYwNzA0MjIyNDk3MTA1MyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 8aeca4055eed97237502ac2a5bb0e9c0545957f757faf9b600be14d02d97eab2 |
| hovercard-subject-tag | issue:4088215140 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/github/github-mcp-server/2229/issue_layout |
| twitter:image | https://opengraph.githubassets.com/c22b1c037613bb29498859d763af85c65ed234bb9ce69c7b80d681254abcf167/github/github-mcp-server/issues/2229 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/c22b1c037613bb29498859d763af85c65ed234bb9ce69c7b80d681254abcf167/github/github-mcp-server/issues/2229 |
| og:image:alt | Problem resolve_pull_request_review_thread requires a thread node ID in PRRT_xxx format. However, this ID is not returned by any existing REST-based MCP tool — it is only obtainable via the GraphQL... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | scottlz0310-user |
| hostname | github.com |
| expected-hostname | github.com |
| None | b2de8c74e5e61e893155ba46ee41bc66170c1644cb795adefa8386d490f7781c |
| turbo-cache-control | no-preview |
| go-import | github.com/github/github-mcp-server git https://github.com/github/github-mcp-server.git |
| octolytics-dimension-user_id | 9919 |
| octolytics-dimension-user_login | github |
| octolytics-dimension-repository_id | 942771284 |
| octolytics-dimension-repository_nwo | github/github-mcp-server |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 942771284 |
| octolytics-dimension-repository_network_root_nwo | github/github-mcp-server |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | d1866027ded575df8a15c731dd8b9986c9483ceb |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width