@@ -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 }
@@ -311,15 +322,23 @@ func listIssues(client *github.Client, t translations.TranslationHelperFunc) (to
311322 ),
312323 mcp .WithString ("state" ,
313324 mcp .Description ("Filter by state ('open', 'closed', 'all')" ),
325+ mcp .Enum ("open" , "closed" , "all" ),
314326 ),
315- mcp .WithString ("labels" ,
316- mcp .Description ("Comma-separated list of labels to filter by" ),
327+ mcp .WithArray ("labels" ,
328+ mcp .Description ("Filter by labels" ),
329+ mcp .Items (
330+ map [string ]interface {}{
331+ "type" : "string" ,
332+ },
333+ ),
317334 ),
318335 mcp .WithString ("sort" ,
319336 mcp .Description ("Sort by ('created', 'updated', 'comments')" ),
337+ mcp .Enum ("created" , "updated" , "comments" ),
320338 ),
321339 mcp .WithString ("direction" ,
322340 mcp .Description ("Sort direction ('asc', 'desc')" ),
341+ mcp .Enum ("asc" , "desc" ),
323342 ),
324343 mcp .WithString ("since" ,
325344 mcp .Description ("Filter by date (ISO 8601 timestamp)" ),
@@ -349,10 +368,12 @@ func listIssues(client *github.Client, t translations.TranslationHelperFunc) (to
349368 return mcp .NewToolResultError (err .Error ()), nil
350369 }
351370
352- opts .Labels , err = optionalCommaSeparatedListParam (request , "labels" )
371+ // Get labels
372+ labels , err := optionalParam [[]string ](request , "labels" )
353373 if err != nil {
354374 return mcp .NewToolResultError (err .Error ()), nil
355375 }
376+ opts .Labels = labels
356377
357378 opts .Sort , err = optionalParam [string ](request , "sort" )
358379 if err != nil {
@@ -431,12 +452,23 @@ func updateIssue(client *github.Client, t translations.TranslationHelperFunc) (t
431452 ),
432453 mcp .WithString ("state" ,
433454 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" ),
455+ mcp .Enum ("open" , "closed" ),
456+ ),
457+ mcp .WithArray ("labels" ,
458+ mcp .Description ("New labels" ),
459+ mcp .Items (
460+ map [string ]interface {}{
461+ "type" : "string" ,
462+ },
463+ ),
464+ ),
465+ mcp .WithArray ("assignees" ,
466+ mcp .Description ("New assignees" ),
467+ mcp .Items (
468+ map [string ]interface {}{
469+ "type" : "string" ,
470+ },
471+ ),
440472 ),
441473 mcp .WithNumber ("milestone" ,
442474 mcp .Description ("New milestone number" ),
@@ -484,15 +516,17 @@ func updateIssue(client *github.Client, t translations.TranslationHelperFunc) (t
484516 issueRequest .State = github .Ptr (state )
485517 }
486518
487- labels , err := optionalCommaSeparatedListParam (request , "labels" )
519+ // Get labels
520+ labels , err := optionalParam [[]string ](request , "labels" )
488521 if err != nil {
489522 return mcp .NewToolResultError (err .Error ()), nil
490523 }
491524 if len (labels ) > 0 {
492525 issueRequest .Labels = & labels
493526 }
494527
495- assignees , err := optionalCommaSeparatedListParam (request , "assignees" )
528+ // Get assignees
529+ assignees , err := optionalParam [[]string ](request , "assignees" )
496530 if err != nil {
497531 return mcp .NewToolResultError (err .Error ()), nil
498532 }
0 commit comments