Skip to content

Commit 49a0ca8

Browse files
committed
Update defaults
1 parent 31ed16b commit 49a0ca8

3 files changed

Lines changed: 29 additions & 24 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1260,8 +1260,8 @@ The following sets of tools are available:
12601260
- **Required OAuth Scopes**: `repo`
12611261
- `affiliation`: Filter by affiliation. Can be one of: 'outside' (outside collaborators), 'direct' (all with permissions regardless of org membership), 'all' (all collaborators). Default: 'all' (string, optional)
12621262
- `owner`: Repository owner (string, required)
1263-
- `page`: Page number for pagination (min 1) (number, optional)
1264-
- `perPage`: Results per page for pagination (min 1, max 100) (number, optional)
1263+
- `page`: Page number for pagination (default 1, min 1) (number, optional)
1264+
- `perPage`: Results per page for pagination (default 30, min 1, max 100) (number, optional)
12651265
- `repo`: Repository name (string, required)
12661266

12671267
- **list_tags** - List tags

pkg/github/__toolsnaps__/list_repository_collaborators.snap

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"readOnlyHint": true,
44
"title": "List repository collaborators"
55
},
6-
"description": "List collaborators of a GitHub repository.",
6+
"description": "List collaborators of a GitHub repository. Results are paginated; the response includes `nextPage`, `prevPage`, `firstPage`, and `lastPage` fields. To get the next page, use the `nextPage` value as the `page` parameter.",
77
"inputSchema": {
88
"properties": {
99
"affiliation": {
@@ -20,12 +20,12 @@
2020
"type": "string"
2121
},
2222
"page": {
23-
"description": "Page number for pagination (min 1)",
23+
"description": "Page number for pagination (default 1, min 1)",
2424
"minimum": 1,
2525
"type": "number"
2626
},
2727
"perPage": {
28-
"description": "Results per page for pagination (min 1, max 100)",
28+
"description": "Results per page for pagination (default 30, min 1, max 100)",
2929
"maximum": 100,
3030
"minimum": 1,
3131
"type": "number"

pkg/github/repositories.go

Lines changed: 24 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2209,30 +2209,35 @@ func ListRepositoryCollaborators(t translations.TranslationHelperFunc) inventory
22092209
ToolsetMetadataRepos,
22102210
mcp.Tool{
22112211
Name: "list_repository_collaborators",
2212-
Description: t("TOOL_LIST_REPOSITORY_COLLABORATORS_DESCRIPTION", "List collaborators of a GitHub repository."),
2212+
Description: t("TOOL_LIST_REPOSITORY_COLLABORATORS_DESCRIPTION", "List collaborators of a GitHub repository. Results are paginated; the response includes `nextPage`, `prevPage`, `firstPage`, and `lastPage` fields. To get the next page, use the `nextPage` value as the `page` parameter."),
22132213
Annotations: &mcp.ToolAnnotations{
22142214
Title: t("TOOL_LIST_REPOSITORY_COLLABORATORS_USER_TITLE", "List repository collaborators"),
22152215
ReadOnlyHint: true,
22162216
},
2217-
InputSchema: WithPagination(&jsonschema.Schema{
2218-
Type: "object",
2219-
Properties: map[string]*jsonschema.Schema{
2220-
"owner": {
2221-
Type: "string",
2222-
Description: "Repository owner",
2223-
},
2224-
"repo": {
2225-
Type: "string",
2226-
Description: "Repository name",
2227-
},
2228-
"affiliation": {
2229-
Type: "string",
2230-
Description: "Filter by affiliation. Can be one of: 'outside' (outside collaborators), 'direct' (all with permissions regardless of org membership), 'all' (all collaborators). Default: 'all'",
2231-
Enum: []any{"outside", "direct", "all"},
2217+
InputSchema: func() *jsonschema.Schema {
2218+
schema := WithPagination(&jsonschema.Schema{
2219+
Type: "object",
2220+
Properties: map[string]*jsonschema.Schema{
2221+
"owner": {
2222+
Type: "string",
2223+
Description: "Repository owner",
2224+
},
2225+
"repo": {
2226+
Type: "string",
2227+
Description: "Repository name",
2228+
},
2229+
"affiliation": {
2230+
Type: "string",
2231+
Description: "Filter by affiliation. Can be one of: 'outside' (outside collaborators), 'direct' (all with permissions regardless of org membership), 'all' (all collaborators). Default: 'all'",
2232+
Enum: []any{"outside", "direct", "all"},
2233+
},
22322234
},
2233-
},
2234-
Required: []string{"owner", "repo"},
2235-
}),
2235+
Required: []string{"owner", "repo"},
2236+
})
2237+
schema.Properties["page"].Description = "Page number for pagination (default 1, min 1)"
2238+
schema.Properties["perPage"].Description = "Results per page for pagination (default 30, min 1, max 100)"
2239+
return schema
2240+
}(),
22362241
},
22372242
[]scopes.Scope{scopes.Repo},
22382243
func(ctx context.Context, deps ToolDependencies, _ *mcp.CallToolRequest, args map[string]any) (*mcp.CallToolResult, any, error) {

0 commit comments

Comments
 (0)