Fix perPage parameter name in actions_list schema - #3142
Open
karpovantonme wants to merge 1 commit into
Open
Conversation
The schema declared per_page while the handler reads pagination through OptionalPaginationParams, which looks for perPage, so the value was always dropped and perPage fell back to the default 30.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
actions_listdeclaresper_pagein its input schema, but the handler reads pagination throughOptionalPaginationParams, which looks forperPage. Whatever the client sends is dropped and perPage always falls back to the default 30.Why
pagein the same schema matches and works, so it is just the one name. Every other tool usingOptionalPaginationParamsgets its schema fromWithPagination, which spells itperPage;actions_listis the only place where the pagination properties are written out by hand.projects.godeclaresper_pagetoo, but reads it back under the same name, so I left that one alone.Built both binaries and called the tool over stdio against this repo:
What changed
pkg/github/actions.go:per_page->perPagein theactions_listschema__toolsnaps__/actions_list.snapregenerated withUPDATE_TOOLSNAPS=truescript/generate-docsMCP impact
One property is renamed. Clients that were sending
per_pagewere already being ignored, so nothing that worked before stops working.Prompts tested (tool changes only)
"List the most recent workflow run in github/github-mcp-server" -- with a page size, this is the case that was silently returning 30 items.
Security / limits
Tool renaming
Lint & tests
./script/lint./script/testDocs