@@ -283,6 +283,9 @@ func CreateIssue(getClient GetClientFn, t translations.TranslationHelperFunc) (t
283
283
mcp .WithNumber ("milestone" ,
284
284
mcp .Description ("Milestone number" ),
285
285
),
286
+ mcp .WithString ("type" ,
287
+ mcp .Description ("Type of this issue" ),
288
+ ),
286
289
),
287
290
func (ctx context.Context , request mcp.CallToolRequest ) (* mcp.CallToolResult , error ) {
288
291
owner , err := requiredParam [string ](request , "owner" )
@@ -327,13 +330,20 @@ func CreateIssue(getClient GetClientFn, t translations.TranslationHelperFunc) (t
327
330
milestoneNum = & milestone
328
331
}
329
332
333
+ // Get optional type
334
+ issueType , err := OptionalParam [string ](request , "type" )
335
+ if err != nil {
336
+ return mcp .NewToolResultError (err .Error ()), nil
337
+ }
338
+
330
339
// Create the issue request
331
340
issueRequest := & github.IssueRequest {
332
341
Title : github .Ptr (title ),
333
342
Body : github .Ptr (body ),
334
343
Assignees : & assignees ,
335
344
Labels : & labels ,
336
345
Milestone : milestoneNum ,
346
+ Type : & issueType ,
337
347
}
338
348
339
349
client , err := getClient (ctx )
@@ -534,6 +544,9 @@ func UpdateIssue(getClient GetClientFn, t translations.TranslationHelperFunc) (t
534
544
mcp .WithNumber ("milestone" ,
535
545
mcp .Description ("New milestone number" ),
536
546
),
547
+ mcp .WithString ("type" ,
548
+ mcp .Description ("New issue type" ),
549
+ ),
537
550
),
538
551
func (ctx context.Context , request mcp.CallToolRequest ) (* mcp.CallToolResult , error ) {
539
552
owner , err := requiredParam [string ](request , "owner" )
@@ -604,6 +617,15 @@ func UpdateIssue(getClient GetClientFn, t translations.TranslationHelperFunc) (t
604
617
issueRequest .Milestone = & milestoneNum
605
618
}
606
619
620
+ // Get issue type
621
+ issueType , err := OptionalParam [string ](request , "type" )
622
+ if err != nil {
623
+ return mcp .NewToolResultError (err .Error ()), nil
624
+ }
625
+ if issueType != "" {
626
+ issueRequest .Type = github .Ptr (issueType )
627
+ }
628
+
607
629
client , err := getClient (ctx )
608
630
if err != nil {
609
631
return nil , fmt .Errorf ("failed to get GitHub client: %w" , err )
0 commit comments