@@ -228,11 +228,21 @@ func createIssue(client *github.Client, t translations.TranslationHelperFunc) (t
228
228
mcp .WithString ("body" ,
229
229
mcp .Description ("Issue body content" ),
230
230
),
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
+ ),
236
246
),
237
247
),
238
248
func (ctx context.Context , request mcp.CallToolRequest ) (* mcp.CallToolResult , error ) {
@@ -256,12 +266,13 @@ func createIssue(client *github.Client, t translations.TranslationHelperFunc) (t
256
266
}
257
267
258
268
// Get assignees
259
- assignees , err := optionalCommaSeparatedListParam (request , "assignees" )
269
+ assignees , err := optionalParam [[] string ] (request , "assignees" )
260
270
if err != nil {
261
271
return mcp .NewToolResultError (err .Error ()), nil
262
272
}
273
+
263
274
// Get labels
264
- labels , err := optionalCommaSeparatedListParam (request , "labels" )
275
+ labels , err := optionalParam [[] string ] (request , "labels" )
265
276
if err != nil {
266
277
return mcp .NewToolResultError (err .Error ()), nil
267
278
}
@@ -312,8 +323,13 @@ func listIssues(client *github.Client, t translations.TranslationHelperFunc) (to
312
323
mcp .WithString ("state" ,
313
324
mcp .Description ("Filter by state ('open', 'closed', 'all')" ),
314
325
),
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
+ ),
317
333
),
318
334
mcp .WithString ("sort" ,
319
335
mcp .Description ("Sort by ('created', 'updated', 'comments')" ),
@@ -349,7 +365,8 @@ func listIssues(client *github.Client, t translations.TranslationHelperFunc) (to
349
365
return mcp .NewToolResultError (err .Error ()), nil
350
366
}
351
367
352
- opts .Labels , err = optionalCommaSeparatedListParam (request , "labels" )
368
+ // Get labels
369
+ opts .Labels , err = optionalParam [[]string ](request , "labels" )
353
370
if err != nil {
354
371
return mcp .NewToolResultError (err .Error ()), nil
355
372
}
@@ -431,12 +448,23 @@ func updateIssue(client *github.Client, t translations.TranslationHelperFunc) (t
431
448
),
432
449
mcp .WithString ("state" ,
433
450
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
+ ),
440
468
),
441
469
mcp .WithNumber ("milestone" ,
442
470
mcp .Description ("New milestone number" ),
@@ -484,15 +512,17 @@ func updateIssue(client *github.Client, t translations.TranslationHelperFunc) (t
484
512
issueRequest .State = github .Ptr (state )
485
513
}
486
514
487
- labels , err := optionalCommaSeparatedListParam (request , "labels" )
515
+ // Get labels
516
+ labels , err := optionalParam [[]string ](request , "labels" )
488
517
if err != nil {
489
518
return mcp .NewToolResultError (err .Error ()), nil
490
519
}
491
520
if len (labels ) > 0 {
492
521
issueRequest .Labels = & labels
493
522
}
494
523
495
- assignees , err := optionalCommaSeparatedListParam (request , "assignees" )
524
+ // Get assignees
525
+ assignees , err := optionalParam [[]string ](request , "assignees" )
496
526
if err != nil {
497
527
return mcp .NewToolResultError (err .Error ()), nil
498
528
}
0 commit comments