Skip to content

Commit f0eeb85

Browse files
committed
Fix enum values to match those expected by gql
1 parent 6586b84 commit f0eeb85

1 file changed

Lines changed: 14 additions & 14 deletions

File tree

pkg/github/issues_granular.go

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ func GranularUpdateIssueLabels(t translations.TranslationHelperFunc) inventory.S
281281
ToolsetMetadataIssues,
282282
mcp.Tool{
283283
Name: "update_issue_labels",
284-
Description: t("TOOL_UPDATE_ISSUE_LABELS_DESCRIPTION", "Update the labels of an existing issue. This replaces the current labels with the provided list. When setting values, include a confidence level (low, medium, or high) reflecting how certain you are about the choice."),
284+
Description: t("TOOL_UPDATE_ISSUE_LABELS_DESCRIPTION", "Update the labels of an existing issue. This replaces the current labels with the provided list. When setting values, include a confidence level (LOW, MEDIUM, or HIGH) reflecting how certain you are about the choice."),
285285
Annotations: &mcp.ToolAnnotations{
286286
Title: t("TOOL_UPDATE_ISSUE_LABELS_USER_TITLE", "Update Issue Labels"),
287287
ReadOnlyHint: false,
@@ -325,8 +325,8 @@ func GranularUpdateIssueLabels(t translations.TranslationHelperFunc) inventory.S
325325
},
326326
"confidence": {
327327
Type: "string",
328-
Description: "How confident you are in this choice. Use 'high' for clear signal or explicit user request, 'medium' for reasonable inference with some ambiguity, 'low' for best guess with limited signal.",
329-
Enum: []any{"low", "medium", "high"},
328+
Description: "How confident you are in this choice. Use 'HIGH' for clear signal or explicit user request, 'MEDIUM' for reasonable inference with some ambiguity, 'LOW' for best guess with limited signal.",
329+
Enum: []any{"LOW", "MEDIUM", "HIGH"},
330330
},
331331
"is_suggestion": {
332332
Type: "boolean",
@@ -398,8 +398,8 @@ func GranularUpdateIssueLabels(t translations.TranslationHelperFunc) inventory.S
398398
if err != nil {
399399
return utils.NewToolResultError(err.Error()), nil, nil
400400
}
401-
if confidence != "" && confidence != "low" && confidence != "medium" && confidence != "high" {
402-
return utils.NewToolResultError("confidence must be one of: low, medium, high"), nil, nil
401+
if confidence != "" && confidence != "LOW" && confidence != "MEDIUM" && confidence != "HIGH" {
402+
return utils.NewToolResultError("confidence must be one of: LOW, MEDIUM, HIGH"), nil, nil
403403
}
404404
isSuggestion, err := OptionalParam[bool](v, "is_suggestion")
405405
if err != nil {
@@ -505,7 +505,7 @@ func GranularUpdateIssueType(t translations.TranslationHelperFunc) inventory.Ser
505505
ToolsetMetadataIssues,
506506
mcp.Tool{
507507
Name: "update_issue_type",
508-
Description: t("TOOL_UPDATE_ISSUE_TYPE_DESCRIPTION", "Update the type of an existing issue (e.g. 'bug', 'feature'). When setting values, include a confidence level (low, medium, or high) reflecting how certain you are about the choice."),
508+
Description: t("TOOL_UPDATE_ISSUE_TYPE_DESCRIPTION", "Update the type of an existing issue (e.g. 'bug', 'feature'). When setting values, include a confidence level (LOW, MEDIUM, or HIGH) reflecting how certain you are about the choice."),
509509
Annotations: &mcp.ToolAnnotations{
510510
Title: t("TOOL_UPDATE_ISSUE_TYPE_USER_TITLE", "Update Issue Type"),
511511
ReadOnlyHint: false,
@@ -540,8 +540,8 @@ func GranularUpdateIssueType(t translations.TranslationHelperFunc) inventory.Ser
540540
},
541541
"confidence": {
542542
Type: "string",
543-
Description: "How confident you are in this choice. Use 'high' for clear signal or explicit user request, 'medium' for reasonable inference with some ambiguity, 'low' for best guess with limited signal.",
544-
Enum: []any{"low", "medium", "high"},
543+
Description: "How confident you are in this choice. Use 'HIGH' for clear signal or explicit user request, 'MEDIUM' for reasonable inference with some ambiguity, 'LOW' for best guess with limited signal.",
544+
Enum: []any{"LOW", "MEDIUM", "HIGH"},
545545
},
546546
"is_suggestion": {
547547
Type: "boolean",
@@ -582,8 +582,8 @@ func GranularUpdateIssueType(t translations.TranslationHelperFunc) inventory.Ser
582582
if err != nil {
583583
return utils.NewToolResultError(err.Error()), nil, nil
584584
}
585-
if confidence != "" && confidence != "low" && confidence != "medium" && confidence != "high" {
586-
return utils.NewToolResultError("confidence must be one of: low, medium, high"), nil, nil
585+
if confidence != "" && confidence != "LOW" && confidence != "MEDIUM" && confidence != "HIGH" {
586+
return utils.NewToolResultError("confidence must be one of: LOW, MEDIUM, HIGH"), nil, nil
587587
}
588588
isSuggestion, err := OptionalParam[bool](args, "is_suggestion")
589589
if err != nil {
@@ -987,8 +987,8 @@ func GranularSetIssueFields(t translations.TranslationHelperFunc) inventory.Serv
987987
},
988988
"confidence": {
989989
Type: "string",
990-
Description: "How confident you are in this choice. Use 'high' for clear signal or explicit user request, 'medium' for reasonable inference with some ambiguity, 'low' for best guess with limited signal.",
991-
Enum: []any{"low", "medium", "high"},
990+
Description: "How confident you are in this choice. Use 'HIGH' for clear signal or explicit user request, 'MEDIUM' for reasonable inference with some ambiguity, 'LOW' for best guess with limited signal.",
991+
Enum: []any{"LOW", "MEDIUM", "HIGH"},
992992
},
993993
"is_suggestion": {
994994
Type: "boolean",
@@ -1111,8 +1111,8 @@ func GranularSetIssueFields(t translations.TranslationHelperFunc) inventory.Serv
11111111
if err != nil {
11121112
return utils.NewToolResultError(err.Error()), nil, nil
11131113
}
1114-
if confidence != "" && confidence != "low" && confidence != "medium" && confidence != "high" {
1115-
return utils.NewToolResultError("confidence must be one of: low, medium, high"), nil, nil
1114+
if confidence != "" && confidence != "LOW" && confidence != "MEDIUM" && confidence != "HIGH" {
1115+
return utils.NewToolResultError("confidence must be one of: LOW, MEDIUM, HIGH"), nil, nil
11161116
}
11171117
if confidence != "" {
11181118
input.Confidence = &confidence

0 commit comments

Comments
 (0)