github-mcp-server icon indicating copy to clipboard operation
github-mcp-server copied to clipboard

get_review_comments (and possibly other methods) paging but with sorting by recent

Open michael-budnik opened this issue 1 year ago • 1 comments

Describe the feature or problem you’d like to solve

I have a moderately big PR, with few reviews rounds. When I want AI to focus on latest comments only , there's no way for it to page from the end. The response doesn't even include total count. Even with 10 per page it hit a limit of 25k tokens! The latest review comments started at the 22th index. So had to fallback to 5 per page and do 5 calls. Which was about 50k tokens! I know graphql-like response filtering is on the radar and would also help with that.

Benefit

Would save a lot tokens for active PRs.

Additional context

CC trying to find the latest comments:

Image

michael-budnik avatar Oct 24 '25 08:10 michael-budnik

Hello, I believe https://github.com/github/github-mcp-server/pull/1554 has resolved this issue. A cursor is now returned for get_review_comments. You can page through results by passing that endCursor back in the after parameter.

Also the work that has been done on grouping comments into threads should also cut down the token usage you were hitting on active PRs. Thanks!

RossTarrant avatar Jun 01 '26 12:06 RossTarrant