@@ -144,15 +144,32 @@ func searchIssues(client *github.Client, t translations.TranslationHelperFunc) (
144144 ),
145145 mcp .WithString ("sort" ,
146146 mcp .Description ("Sort field (comments, reactions, created, etc.)" ),
147+ mcp .Enum (
148+ "comments" ,
149+ "reactions" ,
150+ "reactions-+1" ,
151+ "reactions--1" ,
152+ "reactions-smile" ,
153+ "reactions-thinking_face" ,
154+ "reactions-heart" ,
155+ "reactions-tada" ,
156+ "interactions" ,
157+ "created" ,
158+ "updated" ,
159+ ),
147160 ),
148161 mcp .WithString ("order" ,
149162 mcp .Description ("Sort order ('asc' or 'desc')" ),
163+ mcp .Enum ("asc" , "desc" ),
150164 ),
151165 mcp .WithNumber ("per_page" ,
152166 mcp .Description ("Results per page (max 100)" ),
167+ mcp .Min (1 ),
168+ mcp .Max (100 ),
153169 ),
154170 mcp .WithNumber ("page" ,
155171 mcp .Description ("Page number" ),
172+ mcp .Min (1 ),
156173 ),
157174 ),
158175 func (ctx context.Context , request mcp.CallToolRequest ) (* mcp.CallToolResult , error ) {
@@ -228,11 +245,21 @@ func createIssue(client *github.Client, t translations.TranslationHelperFunc) (t
228245 mcp .WithString ("body" ,
229246 mcp .Description ("Issue body content" ),
230247 ),
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" ),
248+ mcp .WithArray ("assignees" ,
249+ mcp .Description ("Usernames to assign to this issue" ),
250+ mcp .Items (
251+ map [string ]interface {}{
252+ "type" : "string" ,
253+ },
254+ ),
255+ ),
256+ mcp .WithArray ("labels" ,
257+ mcp .Description ("Labels to apply to this issue" ),
258+ mcp .Items (
259+ map [string ]interface {}{
260+ "type" : "string" ,
261+ },
262+ ),
236263 ),
237264 ),
238265 func (ctx context.Context , request mcp.CallToolRequest ) (* mcp.CallToolResult , error ) {
@@ -256,12 +283,13 @@ func createIssue(client *github.Client, t translations.TranslationHelperFunc) (t
256283 }
257284
258285 // Get assignees
259- assignees , err := optionalCommaSeparatedListParam (request , "assignees" )
286+ assignees , err := optionalParam [[] string ] (request , "assignees" )
260287 if err != nil {
261288 return mcp .NewToolResultError (err .Error ()), nil
262289 }
290+
263291 // Get labels
264- labels , err := optionalCommaSeparatedListParam (request , "labels" )
292+ labels , err := optionalParam [[] string ] (request , "labels" )
265293 if err != nil {
266294 return mcp .NewToolResultError (err .Error ()), nil
267295 }
@@ -311,15 +339,23 @@ func listIssues(client *github.Client, t translations.TranslationHelperFunc) (to
311339 ),
312340 mcp .WithString ("state" ,
313341 mcp .Description ("Filter by state ('open', 'closed', 'all')" ),
342+ mcp .Enum ("open" , "closed" , "all" ),
314343 ),
315- mcp .WithString ("labels" ,
316- mcp .Description ("Comma-separated list of labels to filter by" ),
344+ mcp .WithArray ("labels" ,
345+ mcp .Description ("Filter by labels" ),
346+ mcp .Items (
347+ map [string ]interface {}{
348+ "type" : "string" ,
349+ },
350+ ),
317351 ),
318352 mcp .WithString ("sort" ,
319353 mcp .Description ("Sort by ('created', 'updated', 'comments')" ),
354+ mcp .Enum ("created" , "updated" , "comments" ),
320355 ),
321356 mcp .WithString ("direction" ,
322357 mcp .Description ("Sort direction ('asc', 'desc')" ),
358+ mcp .Enum ("asc" , "desc" ),
323359 ),
324360 mcp .WithString ("since" ,
325361 mcp .Description ("Filter by date (ISO 8601 timestamp)" ),
@@ -349,7 +385,8 @@ func listIssues(client *github.Client, t translations.TranslationHelperFunc) (to
349385 return mcp .NewToolResultError (err .Error ()), nil
350386 }
351387
352- opts .Labels , err = optionalCommaSeparatedListParam (request , "labels" )
388+ // Get labels
389+ opts .Labels , err = optionalParam [[]string ](request , "labels" )
353390 if err != nil {
354391 return mcp .NewToolResultError (err .Error ()), nil
355392 }
@@ -431,12 +468,23 @@ func updateIssue(client *github.Client, t translations.TranslationHelperFunc) (t
431468 ),
432469 mcp .WithString ("state" ,
433470 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" ),
471+ mcp .Enum ("open" , "closed" ),
472+ ),
473+ mcp .WithArray ("labels" ,
474+ mcp .Description ("New labels" ),
475+ mcp .Items (
476+ map [string ]interface {}{
477+ "type" : "string" ,
478+ },
479+ ),
480+ ),
481+ mcp .WithArray ("assignees" ,
482+ mcp .Description ("New assignees" ),
483+ mcp .Items (
484+ map [string ]interface {}{
485+ "type" : "string" ,
486+ },
487+ ),
440488 ),
441489 mcp .WithNumber ("milestone" ,
442490 mcp .Description ("New milestone number" ),
@@ -484,15 +532,17 @@ func updateIssue(client *github.Client, t translations.TranslationHelperFunc) (t
484532 issueRequest .State = github .Ptr (state )
485533 }
486534
487- labels , err := optionalCommaSeparatedListParam (request , "labels" )
535+ // Get labels
536+ labels , err := optionalParam [[]string ](request , "labels" )
488537 if err != nil {
489538 return mcp .NewToolResultError (err .Error ()), nil
490539 }
491540 if len (labels ) > 0 {
492541 issueRequest .Labels = & labels
493542 }
494543
495- assignees , err := optionalCommaSeparatedListParam (request , "assignees" )
544+ // Get assignees
545+ assignees , err := optionalParam [[]string ](request , "assignees" )
496546 if err != nil {
497547 return mcp .NewToolResultError (err .Error ()), nil
498548 }
0 commit comments