@@ -228,11 +228,21 @@ func createIssue(client *github.Client, t translations.TranslationHelperFunc) (t
228228 mcp .WithString ("body" ,
229229 mcp .Description ("Issue body content" ),
230230 ),
231- mcp .WithString ("assignees" ,
232- mcp .Description ("Comma-separate list of usernames to assign to this issue" ),
233- ),
234- mcp .WithString ("labels" ,
235- mcp .Description ("Comma-separate list of labels to apply to this issue" ),
231+ mcp .WithArray ("assignees" ,
232+ mcp .Description ("Usernames to assign to this issue" ),
233+ mcp .Items (
234+ map [string ]interface {}{
235+ "type" : "string" ,
236+ },
237+ ),
238+ ),
239+ mcp .WithArray ("labels" ,
240+ mcp .Description ("Labels to apply to this issue" ),
241+ mcp .Items (
242+ map [string ]interface {}{
243+ "type" : "string" ,
244+ },
245+ ),
236246 ),
237247 ),
238248 func (ctx context.Context , request mcp.CallToolRequest ) (* mcp.CallToolResult , error ) {
@@ -256,12 +266,13 @@ func createIssue(client *github.Client, t translations.TranslationHelperFunc) (t
256266 }
257267
258268 // Get assignees
259- assignees , err := optionalCommaSeparatedListParam (request , "assignees" )
269+ assignees , err := optionalParam [[] string ] (request , "assignees" )
260270 if err != nil {
261271 return mcp .NewToolResultError (err .Error ()), nil
262272 }
273+
263274 // Get labels
264- labels , err := optionalCommaSeparatedListParam (request , "labels" )
275+ labels , err := optionalParam [[] string ] (request , "labels" )
265276 if err != nil {
266277 return mcp .NewToolResultError (err .Error ()), nil
267278 }
@@ -312,8 +323,13 @@ func listIssues(client *github.Client, t translations.TranslationHelperFunc) (to
312323 mcp .WithString ("state" ,
313324 mcp .Description ("Filter by state ('open', 'closed', 'all')" ),
314325 ),
315- mcp .WithString ("labels" ,
316- mcp .Description ("Comma-separated list of labels to filter by" ),
326+ mcp .WithArray ("labels" ,
327+ mcp .Description ("Filter by labels" ),
328+ mcp .Items (
329+ map [string ]interface {}{
330+ "type" : "string" ,
331+ },
332+ ),
317333 ),
318334 mcp .WithString ("sort" ,
319335 mcp .Description ("Sort by ('created', 'updated', 'comments')" ),
@@ -349,7 +365,8 @@ func listIssues(client *github.Client, t translations.TranslationHelperFunc) (to
349365 return mcp .NewToolResultError (err .Error ()), nil
350366 }
351367
352- opts .Labels , err = optionalCommaSeparatedListParam (request , "labels" )
368+ // Get labels
369+ opts .Labels , err = optionalParam [[]string ](request , "labels" )
353370 if err != nil {
354371 return mcp .NewToolResultError (err .Error ()), nil
355372 }
@@ -431,12 +448,23 @@ func updateIssue(client *github.Client, t translations.TranslationHelperFunc) (t
431448 ),
432449 mcp .WithString ("state" ,
433450 mcp .Description ("New state ('open' or 'closed')" ),
434- ),
435- mcp .WithString ("labels" ,
436- mcp .Description ("Comma-separated list of new labels" ),
437- ),
438- mcp .WithString ("assignees" ,
439- mcp .Description ("Comma-separated list of new assignees" ),
451+ mcp .Enum ("open" , "closed" ),
452+ ),
453+ mcp .WithArray ("labels" ,
454+ mcp .Description ("New labels" ),
455+ mcp .Items (
456+ map [string ]interface {}{
457+ "type" : "string" ,
458+ },
459+ ),
460+ ),
461+ mcp .WithArray ("assignees" ,
462+ mcp .Description ("New assignees" ),
463+ mcp .Items (
464+ map [string ]interface {}{
465+ "type" : "string" ,
466+ },
467+ ),
440468 ),
441469 mcp .WithNumber ("milestone" ,
442470 mcp .Description ("New milestone number" ),
@@ -484,15 +512,17 @@ func updateIssue(client *github.Client, t translations.TranslationHelperFunc) (t
484512 issueRequest .State = github .Ptr (state )
485513 }
486514
487- labels , err := optionalCommaSeparatedListParam (request , "labels" )
515+ // Get labels
516+ labels , err := optionalParam [[]string ](request , "labels" )
488517 if err != nil {
489518 return mcp .NewToolResultError (err .Error ()), nil
490519 }
491520 if len (labels ) > 0 {
492521 issueRequest .Labels = & labels
493522 }
494523
495- assignees , err := optionalCommaSeparatedListParam (request , "assignees" )
524+ // Get assignees
525+ assignees , err := optionalParam [[]string ](request , "assignees" )
496526 if err != nil {
497527 return mcp .NewToolResultError (err .Error ()), nil
498528 }
0 commit comments