From 7404ba57f6d1d1eeeec4a6e789f34d36ad8d167f Mon Sep 17 00:00:00 2001 From: Juan Broullon Date: Fri, 6 Jun 2025 15:51:10 +0200 Subject: [PATCH] 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 --- pkg/github/code_scanning.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/github/code_scanning.go b/pkg/github/code_scanning.go index 1886b6342..d7e381d31 100644 --- a/pkg/github/code_scanning.go +++ b/pkg/github/code_scanning.go @@ -90,14 +90,14 @@ func ListCodeScanningAlerts(getClient GetClientFn, t translations.TranslationHel mcp.Required(), mcp.Description("The name of the repository."), ), - mcp.WithString("ref", - mcp.Description("The Git reference for the results you want to list."), - ), mcp.WithString("state", mcp.Description("Filter code scanning alerts by state. Defaults to open"), mcp.DefaultString("open"), mcp.Enum("open", "closed", "dismissed", "fixed"), ), + mcp.WithString("ref", + mcp.Description("The Git reference for the results you want to list."), + ), mcp.WithString("severity", mcp.Description("Filter code scanning alerts by severity"), mcp.Enum("critical", "high", "medium", "low", "warning", "note", "error"),