Title: Add pagination support for get_pull_request_diff to handle large PRs · Issue #625 · github/github-mcp-server · GitHub
Open Graph Title: Add pagination support for get_pull_request_diff to handle large PRs · Issue #625 · github/github-mcp-server
X Title: Add pagination support for get_pull_request_diff to handle large PRs · Issue #625 · github/github-mcp-server
Description: Problem The get_pull_request_diff function currently fails when attempting to fetch diffs for large pull requests that exceed the token limit. This makes it impossible to analyze changes in PRs with substantial modifications. Example Err...
Open Graph Description: Problem The get_pull_request_diff function currently fails when attempting to fetch diffs for large pull requests that exceed the token limit. This makes it impossible to analyze changes in PRs wit...
X Description: Problem The get_pull_request_diff function currently fails when attempting to fetch diffs for large pull requests that exceed the token limit. This makes it impossible to analyze changes in PRs wit...
Opengraph URL: https://github.com/github/github-mcp-server/issues/625
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Add pagination support for get_pull_request_diff to handle large PRs","articleBody":"## Problem\n\nThe `get_pull_request_diff` function currently fails when attempting to fetch diffs for large pull requests that exceed the token limit. This makes it impossible to analyze changes in PRs with substantial modifications.\n\n### Example Error\n```\nError: MCP tool \"get_pull_request_diff\" response (36464 tokens) exceeds maximum allowed tokens (25000). \nPlease use pagination, filtering, or limit parameters to reduce the response size.\n```\n\nThis error was encountered when trying to fetch the diff for https://github.com/vmware-tanzu/velero/pull/9019\n\n## Proposed Solution\n\nAdd pagination support to the `get_pull_request_diff` function to handle large diffs by:\n\n1. Implementing pagination parameters (e.g., `page`, `per_page`, or file-based pagination)\n2. Adding options to filter by specific files or paths\n3. Supporting partial diff retrieval with offset/limit parameters\n\n## Use Case\n\nThis enhancement would enable users to:\n- Analyze large pull requests without hitting token limits\n- Retrieve diffs incrementally for better performance\n- Focus on specific files or directories within a PR\n\n## Alternative Workarounds\n\nCurrently, users must resort to other methods like:\n- Using `get_pull_request_files` to list changed files\n- Fetching individual file contents\n- Using the GitHub CLI or API directly\n\nHaving built-in pagination would provide a more seamless experience for MCP users working with large codebases.","author":{"url":"https://github.com/kaovilai","@type":"Person","name":"kaovilai"},"datePublished":"2025-07-01T19:37:37.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":5},"url":"https://github.com/625/github-mcp-server/issues/625"}
| 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:5218a5da-d81d-27a3-0a06-417f563aaf9e |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C310:3B1201:2D81E1:40D0C6:6A6320CD |
| html-safe-nonce | a35f41192022f4fea54b5667c2111281b1fb0e3c8cc8357b1d9748eb58738f4e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMzEwOjNCMTIwMToyRDgxRTE6NDBEMEM2OjZBNjMyMENEIiwidmlzaXRvcl9pZCI6IjMwMjEyNzUyNzcwNjkzMjg1ODkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | cc573199959ba0c85d4b56e365bc20f201ce75258639bf09b99497d24015eb1e |
| hovercard-subject-tag | issue:3193601129 |
| 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/625/issue_layout |
| twitter:image | https://opengraph.githubassets.com/b9071bd2d8aea4f51a88545d7ef0ae32da673e6441540c4eac779af3bf11b3c8/github/github-mcp-server/issues/625 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/b9071bd2d8aea4f51a88545d7ef0ae32da673e6441540c4eac779af3bf11b3c8/github/github-mcp-server/issues/625 |
| og:image:alt | Problem The get_pull_request_diff function currently fails when attempting to fetch diffs for large pull requests that exceed the token limit. This makes it impossible to analyze changes in PRs wit... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | kaovilai |
| hostname | github.com |
| expected-hostname | github.com |
| None | 1a6c056e02f174fffc096c521ec0ff6fb83e40a2ec8cb8875466ec1524872dd6 |
| 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 | 6a93e25585f487ddff9e3996c06d5b869d6e1828 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width