@@ -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,7 +368,8 @@ 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+ opts .Labels , err = optionalParam [[]string ](request , "labels" )
353373 if err != nil {
354374 return mcp .NewToolResultError (err .Error ()), nil
355375 }
@@ -431,12 +451,23 @@ func updateIssue(client *github.Client, t translations.TranslationHelperFunc) (t
431451 ),
432452 mcp .WithString ("state" ,
433453 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" ),
454+ mcp .Enum ("open" , "closed" ),
455+ ),
456+ mcp .WithArray ("labels" ,
457+ mcp .Description ("New labels" ),
458+ mcp .Items (
459+ map [string ]interface {}{
460+ "type" : "string" ,
461+ },
462+ ),
463+ ),
464+ mcp .WithArray ("assignees" ,
465+ mcp .Description ("New assignees" ),
466+ mcp .Items (
467+ map [string ]interface {}{
468+ "type" : "string" ,
469+ },
470+ ),
440471 ),
441472 mcp .WithNumber ("milestone" ,
442473 mcp .Description ("New milestone number" ),
@@ -484,15 +515,17 @@ func updateIssue(client *github.Client, t translations.TranslationHelperFunc) (t
484515 issueRequest .State = github .Ptr (state )
485516 }
486517
487- labels , err := optionalCommaSeparatedListParam (request , "labels" )
518+ // Get labels
519+ labels , err := optionalParam [[]string ](request , "labels" )
488520 if err != nil {
489521 return mcp .NewToolResultError (err .Error ()), nil
490522 }
491523 if len (labels ) > 0 {
492524 issueRequest .Labels = & labels
493525 }
494526
495- assignees , err := optionalCommaSeparatedListParam (request , "assignees" )
527+ // Get assignees
528+ assignees , err := optionalParam [[]string ](request , "assignees" )
496529 if err != nil {
497530 return mcp .NewToolResultError (err .Error ()), nil
498531 }
0 commit comments