Title: Reject unsupported pagination params in pull_request_read by muhammadumer-waheed · Pull Request #3336 · github/github-mcp-server · GitHub
Open Graph Title: Reject unsupported pagination params in pull_request_read by muhammadumer-waheed · Pull Request #3336 · github/github-mcp-server
X Title: Reject unsupported pagination params in pull_request_read by muhammadumer-waheed · Pull Request #3336 · github/github-mcp-server
Description: Summary pull_request_read now returns a validation error when a pagination parameter is passed that the selected method does not use, instead of silently dropping it. Why A pagination parameter that the selected method cannot honour was silently dropped: an agent following the schema and passing after to e.g. get_files would get the first page back again with no signal that anything was ignored. Silent parameter drops are worst-case for agentic callers, since the tool reports success with a plausible payload and the model has no reason to retry. Fixes #3316 What changed Added validatePaginationParamsForMethod in pkg/github/pullrequests.go, called before the tool dispatches on method: after is rejected for all methods except get_review_comments (with a hint to use get_review_comments for cursor-based pagination) page is rejected for get_review_comments, which uses cursor-based pagination perPage remains accepted for every method Added table-driven tests covering both rejection cases plus positive cases confirming page/perPage still work for get_files and perPage/after still work for get_review_comments. MCP impact No tool or API changes Tool schema or behavior changed New tool added The pull_request_read input schema is unchanged; behavior only: passing a pagination parameter the selected method does not honour now returns an error naming the method and the parameter, instead of silently returning the first page. Prompts tested (tool changes only) "Show me the files changed in PR #42, page 2 with 10 per page" → get_files with page/perPage: accepted (covered by unit test) "Get the review comments on PR #42 after cursor cursor-page-2" → get_review_comments with after: accepted (covered by unit test) "Get the files changed in PR #42 after cursor cursor-page-2" → get_files with after: now errors with method "get_files" uses page/perPage pagination; "after" is not supported (covered by unit test) 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 Lint & tests Linted locally with ./script/lint Tested locally with ./script/test Docs Not needed Updated (README / docs / examples)
Open Graph Description: Summary pull_request_read now returns a validation error when a pagination parameter is passed that the selected method does not use, instead of silently dropping it. Why A pagination parameter tha...
X Description: Summary pull_request_read now returns a validation error when a pagination parameter is passed that the selected method does not use, instead of silently dropping it. Why A pagination parameter tha...
Opengraph URL: https://github.com/github/github-mcp-server/pull/3336
X: @github
Domain: github.com
IPv4 address: 140.82.113.4
| 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 | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:230eba7d-6495-bfa5-99db-b2f0ac878043 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | BF5C:26387A:E9173:13C770:6B05D7C0 |
| html-safe-nonce | 6c6e2c83a93c6e9cfec3250dde99f8963662a62c8b628aafa6dcd31be7b8912c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRjVDOjI2Mzg3QTpFOTE3MzoxM0M3NzA6NkIwNUQ3QzAiLCJ2aXNpdG9yX2lkIjoiMjI0NDM0NDI4MDUzNTkxNDQzMiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 60b278618222f301a1673909e08a6002a06cd887b582f76451efe1725f525b9b |
| hovercard-subject-tag | pull_request:4640332319 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,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/github/github-mcp-server/pull/3336/files |
| twitter:image | https://avatars.githubusercontent.com/u/273130505?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/273130505?s=400&v=4 |
| og:image:alt | Summary pull_request_read now returns a validation error when a pagination parameter is passed that the selected method does not use, instead of silently dropping it. Why A pagination parameter tha... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 7cc8361bc0396e5c33704280422dd7a38c5b91f6190589faea57461f56967249 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| 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 full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | ab4da203740f827015a12d36851c8de196e908bf |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | no-cache |
Viewport: width=device-width