Skip to content

Commit b1da114

Browse files
committed
update perPage description for pagination to inform of default 30
1 parent 29f641d commit b1da114

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

pkg/github/server.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,9 @@ func OptionalStringArrayParam(r mcp.CallToolRequest, p string) ([]string, error)
175175
}
176176

177177
// WithPagination returns a ToolOption that adds "page" and "perPage" parameters to the tool.
178-
// The "page" parameter is optional, min 1. The "perPage" parameter is optional, min 1, max 100.
178+
// The "page" parameter is optional, min 1.
179+
// The "perPage" parameter is optional, min 1, max 100. If unset, defaults to 30.
180+
// https://docs.github.com/en/rest/using-the-rest-api/using-pagination-in-the-rest-api
179181
func WithPagination() mcp.ToolOption {
180182
return func(tool *mcp.Tool) {
181183
mcp.WithNumber("page",
@@ -184,7 +186,7 @@ func WithPagination() mcp.ToolOption {
184186
)(tool)
185187

186188
mcp.WithNumber("perPage",
187-
mcp.Description("Results per page for pagination (min 1, max 100)"),
189+
mcp.Description("Results per page for pagination (min 1, max 100). If unset, defaults to 30."),
188190
mcp.Min(1),
189191
mcp.Max(100),
190192
)(tool)

0 commit comments

Comments
 (0)