Skip to content

Commit 7404ba5

Browse files
committed
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 7404ba5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pkg/github/code_scanning.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,14 +90,14 @@ func ListCodeScanningAlerts(getClient GetClientFn, t translations.TranslationHel
9090
mcp.Required(),
9191
mcp.Description("The name of the repository."),
9292
),
93-
mcp.WithString("ref",
94-
mcp.Description("The Git reference for the results you want to list."),
95-
),
9693
mcp.WithString("state",
9794
mcp.Description("Filter code scanning alerts by state. Defaults to open"),
9895
mcp.DefaultString("open"),
9996
mcp.Enum("open", "closed", "dismissed", "fixed"),
10097
),
98+
mcp.WithString("ref",
99+
mcp.Description("The Git reference for the results you want to list."),
100+
),
101101
mcp.WithString("severity",
102102
mcp.Description("Filter code scanning alerts by severity"),
103103
mcp.Enum("critical", "high", "medium", "low", "warning", "note", "error"),

0 commit comments

Comments
 (0)