8000 fix: move defaulted 'state' param after non-default params in list_co… · github/github-mcp-server@da9c97b · GitHub
[go: up one dir, main page]

Skip to content
8000

Commit da9c97b

Browse files
authored
fix: move defaulted 'state' param after non-default params in list_code_scanning_alerts
Fixes `SyntaxError: parameter without a default follows parameter with a default` when using github-mcp-server with the Python MCP SDK
1 parent c17ebfe commit da9c97b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/github/code_scanning.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,11 +115,11 @@ func ListCodeScanningAlerts(getClient GetClientFn, t translations.TranslationHel
115115
if err != nil {
116116
return mcp.NewToolResultError(err.Error()), nil
117117
}
118-
ref, err := OptionalParam[string](request, "ref")
118+
state, err := OptionalParam[string](request, "state")
119119
if err != nil {
120120
return mcp.NewToolResultError(err.Error()), nil
121121
}
122-
state, err := OptionalParam[string](request, "state")
122+
ref, err := OptionalParam[string](request, "ref")
123123
if err != nil {
124124
return mcp.NewToolResultError(err.Error()), nil
125125
}

0 commit comments

Comments
 (0)
0