Title: infra: expose review thread node ID in get_review_comments response (follow-up to #1768) · Issue #2331 · github/github-mcp-server · GitHub
Open Graph Title: infra: expose review thread node ID in get_review_comments response (follow-up to #1768) · Issue #2331 · github/github-mcp-server
X Title: infra: expose review thread node ID in get_review_comments response (follow-up to #1768) · Issue #2331 · github/github-mcp-server
Description: Background After #1768 shipped, resolve_review_thread is available as an MCP tool. However, the companion read path — retrieving a review thread's GraphQL node ID so it can be passed to resolve_review_thread — is still missing from the r...
Open Graph Description: Background After #1768 shipped, resolve_review_thread is available as an MCP tool. However, the companion read path — retrieving a review thread's GraphQL node ID so it can be passed to resolve_rev...
X Description: Background After #1768 shipped, resolve_review_thread is available as an MCP tool. However, the companion read path — retrieving a review thread's GraphQL node ID so it can be passed to resolve...
Opengraph URL: https://github.com/github/github-mcp-server/issues/2331
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"infra: expose review thread node ID in get_review_comments response (follow-up to #1768)","articleBody":"## Background\n\nAfter #1768 shipped, `resolve_review_thread` is available as an MCP tool. However, the companion read path — retrieving a review thread's GraphQL node ID so it can be passed to `resolve_review_thread` — is still missing from the response schema.\n\nWhen an AI agent is addressing PR review feedback, the typical flow is:\n\n1. Read review comments with `pull_request_read method=get_review_comments`.\n2. Reply to the comment with `add_reply_to_pull_request_comment`.\n3. Resolve the thread with `resolve_review_thread`.\n\nStep 3 requires the thread's node ID (e.g. `PRRT_kwDO...`), but step 1's response does not expose it.\n\n## Problem\n\n`pull_request_read method=get_review_comments` returns each `review_threads[]` object with these fields only:\n\n```json\n{\n \"is_resolved\": false,\n \"is_outdated\": false,\n \"is_collapsed\": false,\n \"comments\": [...],\n \"total_count\": N\n}\n```\n\nThere is **no `id` / `node_id` field on the thread object**, so there is no way to obtain the value `resolve_review_thread` requires.\n\nAuxiliary paths are also blocked:\n\n- `add_reply_to_pull_request_comment` returns the *comment*'s node ID (`PRRC_...`), which is distinct from the thread's node ID.\n- `pageInfo.startCursor` / `endCursor` are pagination cursors, not thread IDs.\n- Within an MCP-only session there is no `gh` CLI or direct GraphQL escape hatch.\n\nNote: issue #1768 stated that \"the thread IDs are already returned by `get_review_comments` in the `ID` field\". That does not appear to match the current shipped response schema — the `ID` field is absent on the thread object as of 2026-04-15.\n\n## Reproduction\n\nOn any PR with multiple unresolved review threads, calling `pull_request_read method=get_review_comments` returns no field usable as the `thread_id` argument of `resolve_review_thread`. This was observed while addressing Copilot PR reviewer feedback on a PR with 5 unresolved threads — the workflow had to fall back to manual `gh api graphql` calls outside MCP to complete step 3.\n\nMinimal repro outside MCP — compare the current MCP response shape to this GraphQL query, which does expose the thread `id`:\n\n```graphql\n{\n repository(owner: \"\u003cowner\u003e\", name: \"\u003crepo\u003e\") {\n pullRequest(number: \u003cn\u003e) {\n reviewThreads(first: 50) {\n nodes { id isResolved isOutdated }\n }\n }\n }\n}\n```\n\nThe MCP response should surface the same `id` field on each thread.\n\n## Proposal\n\nEither:\n\n1. **Extend the `get_review_comments` response schema** — include `PullRequestReviewThread.id` (GraphQL node ID) as `id` or `node_id` on each thread object.\n2. **Add a dedicated method** — `pull_request_read method=get_review_threads` that returns a thin list of threads with their node IDs (and the existing `is_resolved` / `is_outdated` / `is_collapsed` flags).\n\nOption 1 is likely a single-field addition: the underlying GraphQL query almost certainly already selects the thread object (since `isResolved`/`isOutdated`/`isCollapsed` are exposed), so adding `id` to the same selection set should be a minimal change.\n\n## Current workaround\n\nFor MCP-only sessions, `resolve_review_thread` is effectively unreachable — users must drop out of MCP and click \"Resolve conversation\" in the GitHub web UI (or run `gh api graphql` outside the session). This defeats the purpose of shipping the tool in #1768.\n\n## References\n\n- #1768 — original request that added `resolve_review_thread`\n- #1086 — `is_resolved` exposure on comments\n- MCP tool list snapshot date: 2026-04-15","author":{"url":"https://github.com/kogangdon","@type":"Person","name":"kogangdon"},"datePublished":"2026-04-15T03:32:13.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/2331/github-mcp-server/issues/2331"}
| 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:1789cbc0-d3b5-d0d7-0837-bc9bc4d0e096 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C82E:69F38:4377AC:5BBDE1:6A61A92E |
| html-safe-nonce | 741a75576f8973cb7a75e84b1a0a8deabdf8d6f33c67733c256fdb75a6d68786 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDODJFOjY5RjM4OjQzNzdBQzo1QkJERTE6NkE2MUE5MkUiLCJ2aXNpdG9yX2lkIjoiOTE2NDE0ODAzNDUxNTM0Nzc1OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 027f0d90adef9906779743782c12b00eaf3f688f7f26df51198ce8aa74cac74e |
| hovercard-subject-tag | issue:4266059253 |
| 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/2331/issue_layout |
| twitter:image | https://opengraph.githubassets.com/b5baf823b6311f4d73b931f0e4323765f651de1b8f9c15f48ac307a2f8f8244d/github/github-mcp-server/issues/2331 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/b5baf823b6311f4d73b931f0e4323765f651de1b8f9c15f48ac307a2f8f8244d/github/github-mcp-server/issues/2331 |
| og:image:alt | Background After #1768 shipped, resolve_review_thread is available as an MCP tool. However, the companion read path — retrieving a review thread's GraphQL node ID so it can be passed to resolve_rev... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | kogangdon |
| hostname | github.com |
| expected-hostname | github.com |
| None | 6f4633bcf01c1ad14b73fd07dd39ac31d61f3d3c2578ee08ec1792b7b351eeb9 |
| 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 | ac296ae7f21856f1f92adbad22f870b6fbb4b907 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width