- Notifications
You must be signed in to change notification settings - Fork1.4k
use WithPagination tool option#632
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Pull Request Overview
This PR refactors several GitHub tools to use a unifiedWithPagination()
helper and renames the pagination parameter fromper_page
toperPage
across the server interfaces.
- Replace individual
mcp.WithNumber("page")
&mcp.WithNumber("per_page")
calls withWithPagination()
- Update handler logic to call
OptionalPaginationParams
and usepagination.page
/pagination.perPage
- Rename all occurrences of
per_page
toperPage
in tests and documentation
Reviewed Changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
pkg/github/issues_test.go | Updated test assertions to expectperPage instead ofper_page |
pkg/github/issues.go | Swapped explicit page/per_page parameters forWithPagination() andOptionalPaginationParams |
pkg/github/actions_test.go | Updated tests for workflows and artifacts to checkperPage |
pkg/github/actions.go | Refactored all Actions tools to useWithPagination() |
README.md | Renamed parameters and updated descriptions for pagination flags |
Files not reviewed (1)
- pkg/github/toolsnaps/get_issue_comments.snap: Language not supported
Comments suppressed due to low confidence (2)
README.md:482
- [nitpick] Nested list items in Markdown currently use
- -
, which may not render correctly; consider using two-space indentation followed by a single hyphen for nested bullets to ensure proper formatting.
- `perPage`: Results per page for pagination (min 1, max 100) (number, optional)
README.md:481
- [nitpick] Consider adding the default values (e.g.,
page=1
,perPage=30
) to these parameter descriptions so that users know the defaults applied byOptionalPaginationParams
.
- `page`: Page number for pagination (min 1) (number, optional)
08a49b0
intomainUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Use
WithPagination()
tool option consistently for tools with pagination.Affected tools:
per_page
argument has been renamed toperPage
in the affected tools. NowperPage
is used across the server.This PR does not add pagination to any tools previously without pagination