Title: `list_commits` returns 30 commits despite `perPage` set to 1 · Issue #136 · github/github-mcp-server · GitHub
Open Graph Title: `list_commits` returns 30 commits despite `perPage` set to 1 · Issue #136 · github/github-mcp-server
X Title: `list_commits` returns 30 commits despite `perPage` set to 1 · Issue #136 · github/github-mcp-server
Description: Describe the bug list_commits does not interpret the perPage parameter correctly and returns 30 commits (default). list_commits({ "owner": "X", "repo": "Y", "perPage": 1 }) Maybe it's a mismatch between github-mcp-server/pkg/github/repos...
Open Graph Description: Describe the bug list_commits does not interpret the perPage parameter correctly and returns 30 commits (default). list_commits({ "owner": "X", "repo": "Y", "perPage": 1 }) Maybe it's a mismatch be...
X Description: Describe the bug list_commits does not interpret the perPage parameter correctly and returns 30 commits (default). list_commits({ "owner": "X", "repo": "Y", ...
Opengraph URL: https://github.com/github/github-mcp-server/issues/136
X: @github
Domain: github.com
IPv4 address: 140.82.114.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`list_commits` returns 30 commits despite `perPage` set to 1","articleBody":"### Describe the bug\n\n`list_commits` does not interpret the `perPage` parameter correctly and returns 30 commits (default).\n\n```py\nlist_commits({\n \"owner\": \"X\",\n \"repo\": \"Y\",\n \"perPage\": 1\n})\n```\n\nMaybe it's a mismatch between https://github.com/github/github-mcp-server/blob/6f7458ae3c97f15b3e6676e7565082a1dfd98e75/pkg/github/repositories.go#L35 and https://github.com/github/github-mcp-server/blob/6f7458ae3c97f15b3e6676e7565082a1dfd98e75/pkg/github/repositories.go#L56 as a result of changes from https://github.com/github/github-mcp-server/pull/90.\n\n### Affected version\n\nPlease run ` docker run -i --rm ghcr.io/github/github-mcp-server ./github-mcp-server --version` and paste the output below\n\n`server version v0.1.0 (b89336793c5bc9b9abdd5100d876babbc1031f5d) 2025-04-04T15:38:21Z`\n\n### Steps to reproduce the behavior\n\n1. Agent config:\n\n```py\n agent = Agent(\n name=\"Assistant\",\n instructions=f\"Answer questions about Git repositories.\",\n mcp_servers=[mcp_server],\n )\n```\n\n2. User input: `Summarize the last change in the repository X/Y`\n3. LLM translated the input into the function call:\n\n```py\nlist_commits({\n \"owner\": \"X\",\n \"repo\": \"Y\",\n \"perPage\": 1\n})\n```\n4. The output from the tool call contains 30 commits, which is the default set in https://github.com/github/github-mcp-server/blob/6f7458ae3c97f15b3e6676e7565082a1dfd98e75/pkg/github/repositories.go#L56\n\n### Expected vs actual behavior\n\nThe `perPage` parameter should be correctly respected.\n\n### Logs\n\n```sh\n$ wc -c output.json\n 179574 output.json\n\n$ cat output.json | jq -r .text | jq '.[].sha' | wc -l\n 30\n```","author":{"url":"https://github.com/bocytko","@type":"Person","name":"bocytko"},"datePublished":"2025-04-06T15:57:05Z","url":"https://github.com/github/github-mcp-server/issues/136"}
| 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:4331b497-449e-8c3d-3f77-2e5f6c4cac22 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D1CE:83B1:18A1DB9:21FFF24:6B06D2BA |
| html-safe-nonce | 29322e80499e9000dde965af9e52d3563fa0caf5d8a9622dfc7f2d3446925970 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMUNFOjgzQjE6MThBMURCOToyMUZGRjI0OjZCMDZEMkJBIiwidmlzaXRvcl9pZCI6IjIwMzI0NzYzMzk4NDgwMDgzNzgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 7284b5e242a65897fb17ce12a0d8589f78ac2281131fd9bf48f8b1b9c1da9b61 |
| hovercard-subject-tag | issue:2975039362 |
| 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/136/issue_layout |
| twitter:image | https://opengraph.githubassets.com/b1e406f842ca70234c9fb65d1a64f4ae1ec95628e85249e1d435e00873f48e38/github/github-mcp-server/issues/136 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/b1e406f842ca70234c9fb65d1a64f4ae1ec95628e85249e1d435e00873f48e38/github/github-mcp-server/issues/136 |
| og:image:alt | Describe the bug list_commits does not interpret the perPage parameter correctly and returns 30 commits (default). list_commits({ "owner": "X", "repo": "Y", "perPage": 1 }) Maybe it's a mismatch be... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | bocytko |
| hostname | github.com |
| expected-hostname | github.com |
| None | 06cadd0061c549662a50be90eb5baba7608f00f521574931eec01db0deb9e636 |
| 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 | 6953c712585a8d7406b7695e48fffcb670fd241d |
| 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