Title: add_issue_comment: `comment_id`/`reaction` marked required but must be omitted for new comments — valid calls fail · Issue #3048 · github/github-mcp-server · GitHub
Open Graph Title: add_issue_comment: `comment_id`/`reaction` marked required but must be omitted for new comments — valid calls fail · Issue #3048 · github/github-mcp-server
X Title: add_issue_comment: `comment_id`/`reaction` marked required but must be omitted for new comments — valid calls fail · Issue #3048 · github/github-mcp-server
Description: Summary add_issue_comment declares comment_id and reaction as required parameters in its tool schema, but for its primary use case (adding a new comment to an issue) both must be omitted entirely. Passing them as empty/zero triggers two ...
Open Graph Description: Summary add_issue_comment declares comment_id and reaction as required parameters in its tool schema, but for its primary use case (adding a new comment to an issue) both must be omitted entirely. ...
X Description: Summary add_issue_comment declares comment_id and reaction as required parameters in its tool schema, but for its primary use case (adding a new comment to an issue) both must be omitted entirely. ...
Opengraph URL: https://github.com/github/github-mcp-server/issues/3048
X: @github
Domain: github.com
IPv4 address: 140.82.112.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"add_issue_comment: `comment_id`/`reaction` marked required but must be omitted for new comments — valid calls fail","articleBody":"## Summary\n\n`add_issue_comment` declares `comment_id` and `reaction` as **required** parameters in its tool schema, but for its primary use case (adding a **new** comment to an issue) both must be **omitted entirely**. Passing them as empty/zero triggers two different hard validation errors, and there is no way to express \"add a new comment\" that satisfies the schema.\n\n## Repro (observed in practice, 2026-08-10)\n\nAttempting to post a new comment body to an issue:\n\n1. **Pass `comment_id: 0`** (since the schema marks it required) →\n ```\n error: missing required parameter: comment_id\n ```\n The server rejects `0` as not a real comment ID, even though the schema claims the field is required — so a satisfied-schema call still fails.\n\n2. **Pass `comment_id` and leave `reaction` empty** (to satisfy both required fields) →\n ```\n error: reaction cannot be empty when provided\n ```\n Empty `reaction` is rejected when present.\n\n3. **Omit `comment_id` and `reaction` entirely** →\n ✅ **works** — the comment posts successfully.\n\n## Root cause\n\nThe tool's input schema marks `comment_id` and `reaction` as `required`, but they are only actually required for the **reaction-to-existing-comment** sub-flow. For the **new-comment** flow (which is `add_issue_comment`'s primary purpose), both fields are meaningless and must be absent. The schema therefore cannot describe the valid \"new comment\" call — any schema-compliant input is either rejected (`comment_id: 0`) or also rejected (empty `reaction`).\n\n## Expected behavior\n\nThe schema should model the actual contract:\n- `comment_id` / `reaction` should be genuinely **optional** (not `required`), so a new comment can be expressed as `{ body, issue_number, owner, repo }` without schema violations.\n\n## Suggested fix\n\nMake `comment_id` and `reaction` optional/conditional in the `add_issue_comment` input schema (with mutual exclusivity or a oneOf for the add-vs-react path), matching how the comment/reaction tools are modeled.\n\n## Related\n\n- #2807 — same tool (`add_issue_comment`) failing on valid args, distinct root cause.\n- #376 — the broader pattern: this server's tool schemas describing parameters as required when the runtime treats them as optional.","author":{"url":"https://github.com/FrozenRegister","@type":"Person","name":"FrozenRegister"},"datePublished":"2026-08-10T12:41:44Z","url":"https://github.com/github/github-mcp-server/issues/3048"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| 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:3e5f126f-f683-4478-4e39-adeb280df758 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | AC76:1FD1:7652CF:A11D52:6B06B358 |
| html-safe-nonce | 1ce6b523b538477ee8a360683250f62468dcba36a259cf0a73648cc0f6df1a91 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQzc2OjFGRDE6NzY1MkNGOkExMUQ1Mjo2QjA2QjM1OCIsInZpc2l0b3JfaWQiOiI2MTA5NTM5ODE4NzA1MTcxMjg4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 0d1f57b592d48a94ac0897dd415e544d2abc3721ba86cdc154d4a29b67438075 |
| hovercard-subject-tag | issue:5110182638 |
| 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/3048/issue_layout |
| twitter:image | https://opengraph.githubassets.com/f8fc6644dcb580fcf2b0b1647b2146b7c3cb6f8d3c45e960389b13d3925b71fa/github/github-mcp-server/issues/3048 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/f8fc6644dcb580fcf2b0b1647b2146b7c3cb6f8d3c45e960389b13d3925b71fa/github/github-mcp-server/issues/3048 |
| og:image:alt | Summary add_issue_comment declares comment_id and reaction as required parameters in its tool schema, but for its primary use case (adding a new comment to an issue) both must be omitted entirely. ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | FrozenRegister |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9b2b1f32e21f9e529372294897d423fa443a20a3a37bafa95dec0f213469ebfc |
| 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 | 5402de66059e5821fab003de929c7056c92d863f |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width