Title: get_discussion and get_discussion_comments accept calls with missing required parameters instead of returning a validation error · Issue #2740 · github/github-mcp-server · GitHub
Open Graph Title: get_discussion and get_discussion_comments accept calls with missing required parameters instead of returning a validation error · Issue #2740 · github/github-mcp-server
X Title: get_discussion and get_discussion_comments accept calls with missing required parameters instead of returning a validation error · Issue #2740 · github/github-mcp-server
Description: Describe the bug When get_discussion or get_discussion_comments is called without one of the required parameters (owner, repo, or discussionNumber), the tool does not return a parameter-validation error. Instead it silently substitutes a...
Open Graph Description: Describe the bug When get_discussion or get_discussion_comments is called without one of the required parameters (owner, repo, or discussionNumber), the tool does not return a parameter-validation ...
X Description: Describe the bug When get_discussion or get_discussion_comments is called without one of the required parameters (owner, repo, or discussionNumber), the tool does not return a parameter-validation ...
Opengraph URL: https://github.com/github/github-mcp-server/issues/2740
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"get_discussion and get_discussion_comments accept calls with missing required parameters instead of returning a validation error","articleBody":"### Describe the bug\n\nWhen `get_discussion` or `get_discussion_comments` is called without one of the required parameters (`owner`, `repo`, or `discussionNumber`), the tool does not return a parameter-validation error. Instead it silently substitutes a zero value and issues a GraphQL request, which returns a confusing API-level error rather than a clear message identifying the missing field.\n\n**Affected version:** current (tested against `ghcr.io/github/github-mcp-server` latest as of 2026-06)\n\n### Steps to reproduce\n\n1. Configure the MCP server normally.\n2. Call `get_discussion` with only `{\"repo\": \"myrepo\", \"discussionNumber\": 1}` (omitting `owner`).\n3. Observe that the tool returns a GraphQL error like `\"Could not resolve to a Repository\"` rather than a message indicating `owner` is required.\n\nRepeat with `get_discussion_comments` and any missing required field.\n\n### Expected behavior\n\nThe tool should return a structured error immediately: `\"missing required parameter: owner\"` (or equivalent), consistent with how `add_discussion_comment` and the other discussion write tools behave when a required parameter is absent.\n\n### Actual behavior\n\nThe tool issues a GraphQL query with the missing field set to its zero value (`\"\"` for strings, `0` for numbers) and returns whichever API error results from that invalid query.\n\n### Additional context\n\nThe write handlers in the same file (`add_discussion_comment`, `reply_to_discussion_comment`, etc.) were updated in PR #2718 to use explicit parameter validation that returns named errors on missing input. The two read handlers were not included in that pass and still use the legacy decoding pattern.\n","author":{"url":"https://github.com/rodboev","@type":"Person","name":"rodboev"},"datePublished":"2026-06-21T01:59:53.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/2740/github-mcp-server/issues/2740"}
| 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:a9c150a2-26fa-ab06-f673-fbcb846a3670 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 914C:7152C:378EFD:506537:6A5F656E |
| html-safe-nonce | c350f5a760010740b99577628adc5e1edaa31cfa336acfa371973ea4906a6beb |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MTRDOjcxNTJDOjM3OEVGRDo1MDY1Mzc6NkE1RjY1NkUiLCJ2aXNpdG9yX2lkIjoiNDEyMDU3NDQxNTYzMzA4MTcxMCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 861042910706dc80d090dc2d33efe93625e84dbf879c68488fc4a1e13af51411 |
| hovercard-subject-tag | issue:4709018244 |
| 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/2740/issue_layout |
| twitter:image | https://opengraph.githubassets.com/94bafe6b49794e31a0e5b92fd3a402ffde111b88f09081e36e81070ba5a59c01/github/github-mcp-server/issues/2740 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/94bafe6b49794e31a0e5b92fd3a402ffde111b88f09081e36e81070ba5a59c01/github/github-mcp-server/issues/2740 |
| og:image:alt | Describe the bug When get_discussion or get_discussion_comments is called without one of the required parameters (owner, repo, or discussionNumber), the tool does not return a parameter-validation ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | rodboev |
| hostname | github.com |
| expected-hostname | github.com |
| None | 00788ab1bca5e7741110f9acff93fb613e3960b647280b664f19a2f2727fc38a |
| 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 | 0f1c555eb8c0d65e8ad53f33a2a87d02583a75b0 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width