diff --git a/pkg/github/issues_test.go b/pkg/github/issues_test.go index 04a2ae19..e8b16e02 100644 --- a/pkg/github/issues_test.go +++ b/pkg/github/issues_test.go @@ -468,9 +468,10 @@ func Test_CreateIssue(t *testing.T) { ), ), requestArgs: map[string]interface{}{ - "owner": "owner", - "repo": "repo", - "title": "Minimal Issue", + "owner": "owner", + "repo": "repo", + "title": "Minimal Issue", + "assignees": nil, // Expect no failure with nil optional value. }, expectError: false, expectedIssue: &github.Issue{ diff --git a/pkg/github/server.go b/pkg/github/server.go index 84c15f50..80457a54 100644 --- a/pkg/github/server.go +++ b/pkg/github/server.go @@ -238,6 +238,8 @@ func OptionalStringArrayParam(r mcp.CallToolRequest, p string) ([]string, error) } switch v := r.Params.Arguments[p].(type) { + case nil: + return []string{}, nil case []string: return v, nil case []any: