Skip to content

Commit 7856815

Browse files
committed
preserve typed tool compatibility
1 parent 1c30ec5 commit 7856815

25 files changed

Lines changed: 494 additions & 115 deletions

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1518,7 +1518,7 @@ For negotiated supported protocol versions `2026-07-28` or newer, the consolidat
15181518

15191519
- **search_repositories** - Search repositories
15201520
- **OAuth Challenge Scopes**: `repo`
1521-
- `minimal_output`: Return minimal repository information (default: true). When false, returns full GitHub API repository objects. (boolean, optional)
1521+
- `minimal_output`: Return minimal repository information (default: true). When false, modern clients receive additional curated repository details, not the complete GitHub API object. Legacy clients retain full GitHub API repository objects. (boolean, optional)
15221522
- `order`: Sort order (string, optional)
15231523
- `page`: Page number for pagination (min 1) (number, optional)
15241524
- `perPage`: Results per page for pagination (min 1, max 100) (number, optional)

‎docs/feature-flags.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -402,8 +402,8 @@ as output formatting) won't appear here.
402402
- `confidence_threshold`: Minimum similarity threshold a candidate must meet to be returned; higher values are stricter. When omitted, the API's high-precision default is used. The scale is defined by the API, so no client-side bounds are enforced. (number, optional)
403403
- `issue_number`: The number of the existing issue to find duplicates for (number, required)
404404
- `owner`: The owner of the repository (string, required)
405-
- `page`: Page number for pagination (min 1) (number, optional)
406-
- `perPage`: Results per page for pagination (min 1, max 100) (number, optional)
405+
- `page`: Page number for pagination (min 0). Zero is forwarded for the GitHub API default. (number, optional)
406+
- `perPage`: Results per page for pagination (min 0, max 100). Zero is forwarded for the GitHub API default. (number, optional)
407407
- `repo`: The name of the repository (string, required)
408408

409409
### `thread_resolution_reason`

‎pkg/github/__toolsnaps__/add_pull_request_review_comment_reaction.snap‎

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -63,27 +63,18 @@
6363
"outputSchema": {
6464
"additionalProperties": false,
6565
"properties": {
66-
"content": {
67-
"description": "Reaction type",
68-
"enum": [
69-
"+1",
70-
"-1",
71-
"laugh",
72-
"confused",
73-
"heart",
74-
"hooray",
75-
"rocket",
76-
"eyes"
77-
],
78-
"type": "string"
79-
},
8066
"id": {
8167
"description": "Reaction ID",
82-
"type": "integer"
68+
"type": "string"
69+
},
70+
"url": {
71+
"description": "Reaction URL",
72+
"type": "string"
8373
}
8474
},
8575
"required": [
86-
"id"
76+
"id",
77+
"url"
8778
],
8879
"type": "object"
8980
}

‎pkg/github/__toolsnaps__/find_duplicate_ff_duplicate_detection.snap‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@
2020
"type": "string"
2121
},
2222
"page": {
23-
"description": "Page number for pagination (min 1)",
24-
"minimum": 1,
23+
"description": "Page number for pagination (min 0). Zero is forwarded for the GitHub API default.",
24+
"minimum": 0,
2525
"type": "number"
2626
},
2727
"perPage": {
28-
"description": "Results per page for pagination (min 1, max 100)",
28+
"description": "Results per page for pagination (min 0, max 100). Zero is forwarded for the GitHub API default.",
2929
"maximum": 100,
30-
"minimum": 1,
30+
"minimum": 0,
3131
"type": "number"
3232
},
3333
"repo": {

‎pkg/github/__toolsnaps__/get_file_contents.snap‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,12 @@
8383
"string"
8484
]
8585
},
86+
"git_url": {
87+
"type": [
88+
"null",
89+
"string"
90+
]
91+
},
8692
"html_url": {
8793
"type": [
8894
"null",
@@ -132,6 +138,12 @@
132138
"null",
133139
"string"
134140
]
141+
},
142+
"url": {
143+
"type": [
144+
"null",
145+
"string"
146+
]
135147
}
136148
},
137149
"type": [

‎pkg/github/__toolsnaps__/get_gist.snap‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@
5050
"language": {
5151
"type": "string"
5252
},
53+
"raw_url": {
54+
"type": "string"
55+
},
5356
"size": {
5457
"description": "File size in bytes.",
5558
"type": "integer"
@@ -63,6 +66,9 @@
6366
},
6467
"type": "object"
6568
},
69+
"git_pull_url": {
70+
"type": "string"
71+
},
6672
"html_url": {
6773
"type": "string"
6874
},

‎pkg/github/__toolsnaps__/list_gists.snap‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@
6363
"language": {
6464
"type": "string"
6565
},
66+
"raw_url": {
67+
"type": "string"
68+
},
6669
"size": {
6770
"description": "File size in bytes.",
6871
"type": "integer"
@@ -76,6 +79,9 @@
7679
},
7780
"type": "object"
7881
},
82+
"git_pull_url": {
83+
"type": "string"
84+
},
7985
"html_url": {
8086
"type": "string"
8187
},

‎pkg/github/__toolsnaps__/search_repositories.snap‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"properties": {
1010
"minimal_output": {
1111
"default": true,
12-
"description": "Return minimal repository information (default: true). When false, returns full GitHub API repository objects.",
12+
"description": "Return minimal repository information (default: true). When false, modern clients receive additional curated repository details, not the complete GitHub API object. Legacy clients retain full GitHub API repository objects.",
1313
"type": "boolean"
1414
},
1515
"order": {

‎pkg/github/consolidated_pull_request_types.go‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -538,6 +538,13 @@ func normalizePullRequestArguments(kind string) func(json.RawMessage) (json.RawM
538538
if spec.methods != nil && !slices.Contains(spec.methods, args["method"].(string)) {
539539
return nil, fmt.Errorf("unknown method: %s", args["method"])
540540
}
541+
if kind == "read" {
542+
if args["method"] != "get_review_comments" {
543+
delete(args, "after")
544+
} else if _, err := OptionalParam[string](args, "after"); err != nil {
545+
return nil, err
546+
}
547+
}
541548
if kind == "reply" {
542549
_, hasBody := args["body"]
543550
_, hasReaction := args["reaction"]

‎pkg/github/find_duplicate.go‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,10 @@ func FindDuplicate(t translations.TranslationHelperFunc) inventory.ServerTool {
6262
Required: []string{"owner", "repo", "issue_number"},
6363
}
6464
WithPagination(schema)
65+
schema.Properties["page"].Minimum = new(0.0)
66+
schema.Properties["page"].Description = "Page number for pagination (min 0). Zero is forwarded for the GitHub API default."
67+
schema.Properties["perPage"].Minimum = new(0.0)
68+
schema.Properties["perPage"].Description = "Results per page for pagination (min 0, max 100). Zero is forwarded for the GitHub API default."
6569
st := NewToolWithSchemaOptions[FindDuplicateInput, []DuplicateCandidate](
6670
ToolsetMetadataIssues,
6771
mcp.Tool{

0 commit comments

Comments
 (0)