Skip to content

Commit 1dbed4c

Browse files
committed
improve description
1 parent 47ac644 commit 1dbed4c

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

pkg/github/issues.go

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1770,36 +1770,36 @@ func AssignCodingAgentPrompt(t translations.TranslationHelperFunc) (tool mcp.Pro
17701770

17711771
// Label Management
17721772

1773-
// CRUDLabel consolidates Create/Get/Update/Delete label operations into a single tool.
1774-
func CRUDLabel(getGQLClient GetGQLClientFn, t translations.TranslationHelperFunc) (mcp.Tool, server.ToolHandlerFunc) {
1775-
return mcp.NewTool("crud_label",
1776-
mcp.WithDescription(t("TOOL_CRUD_LABEL_DESCRIPTION", "Create, read, update, or delete a label in a GitHub repository. Used in context of labels in relation to GitHub resources, they are organizational tags used to categorize and filter issues and pull requests. For 'get' method: if name is provided, retrieves a specific label; if name is omitted, lists all labels in the repository. The use of parameters depends on the specific method selected.")),
1773+
// Label consolidates Create/Get/Update/Delete label operations into a single tool.
1774+
func Label(getGQLClient GetGQLClientFn, t translations.TranslationHelperFunc) (mcp.Tool, server.ToolHandlerFunc) {
1775+
return mcp.NewTool("label",
1776+
mcp.WithDescription(t("TOOL_LABEL_DESCRIPTION", "Create, read, update, or delete repository labels in GitHub. Labels are organizational tags used to categorize and filter issues and pull requests. METHODS: 'create', 'get' - if label parameter name is omitted, lists all labels, 'update', 'delete'.")),
17771777
mcp.WithToolAnnotation(mcp.ToolAnnotation{
1778-
Title: t("TOOL_CRUD_LABEL_TITLE", "CRUD label"),
1778+
Title: t("TOOL_LABEL_TITLE", "Manage label operations - create, read, update, delete"),
17791779
ReadOnlyHint: ToBoolPtr(false),
17801780
}),
17811781
mcp.WithString("method",
17821782
mcp.Required(),
1783-
mcp.Description("Operation to perform: create, get, update or delete"),
1783+
mcp.Description("Create/Read/Update/Delete a github label."),
17841784
mcp.Enum("create", "get", "update", "delete"),
17851785
),
17861786
mcp.WithString("owner",
1787-
mcp.Description("Repository owner"),
1787+
mcp.Description("Repository owner (username or organization name) - required for all operations"),
17881788
),
17891789
mcp.WithString("repo",
1790-
mcp.Description("Repository name"),
1790+
mcp.Description("Repository name - required for all operations"),
17911791
),
17921792
mcp.WithString("name",
1793-
mcp.Description("Label name (for get/update/delete or to create with this name). For 'get' method: optional - if provided, gets specific label; if omitted, lists all labels."),
1793+
mcp.Description("Label name. REQUIRED for: create, update, delete operations. OPTIONAL for: get operation (if omitted, lists all repository labels; if provided, gets specific label details)."),
17941794
),
17951795
mcp.WithString("new_name",
1796-
mcp.Description("New name for the label (update only)"),
1796+
mcp.Description("New name for the label (used only with 'update' method to rename a label)"),
17971797
),
17981798
mcp.WithString("color",
1799-
mcp.Description("Label color as a 6-character hex code without '#', e.g. 'f29513' (create/update)"),
1799+
mcp.Description("Label color as 6-character hex code without '#' prefix, e.g. 'f29513' for orange. REQUIRED for 'create', OPTIONAL for 'update'."),
18001800
),
18011801
mcp.WithString("description",
1802-
mcp.Description("Label description (create/update)"),
1802+
mcp.Description("Label description text. OPTIONAL for both 'create' and 'update' operations."),
18031803
),
18041804
),
18051805
func(ctx context.Context, request mcp.CallToolRequest) (*mcp.CallToolResult, error) {
@@ -2108,30 +2108,30 @@ func CRUDLabel(getGQLClient GetGQLClientFn, t translations.TranslationHelperFunc
21082108
// IssueLabel manages labels on GitHub issues with list, add, and remove operations.
21092109
func IssueLabel(getClient GetClientFn, t translations.TranslationHelperFunc) (mcp.Tool, server.ToolHandlerFunc) {
21102110
return mcp.NewTool("issue_label",
2111-
mcp.WithDescription(t("TOOL_ISSUE_LABEL_DESCRIPTION", "Manage labels on GitHub issues. Use 'list' to get current labels on an issue, 'add' to add labels to an issue, or 'remove' to remove labels from an issue.")),
2111+
mcp.WithDescription(t("TOOL_ISSUE_LABEL_DESCRIPTION", "Manage labels attached to specific GitHub issues. METHODS: 'list', 'add', 'remove'.")),
21122112
mcp.WithToolAnnotation(mcp.ToolAnnotation{
2113-
Title: t("TOOL_ISSUE_LABEL_TITLE", "Manage issue labels"),
2113+
Title: t("TOOL_ISSUE_LABEL_TITLE", "Manage issue labels - list, add, remove"),
21142114
ReadOnlyHint: ToBoolPtr(false),
21152115
}),
21162116
mcp.WithString("method",
21172117
mcp.Required(),
2118-
mcp.Description("Operation to perform: list, add, or remove"),
2118+
mcp.Description("Operation to perform: 'list' (show current labels), 'add' (attach labels), 'remove' (detach labels)"),
21192119
mcp.Enum("list", "add", "remove"),
21202120
),
21212121
mcp.WithString("owner",
21222122
mcp.Required(),
2123-
mcp.Description("Repository owner"),
2123+
mcp.Description("Repository owner (username or organization name) - required for all operations"),
21242124
),
21252125
mcp.WithString("repo",
21262126
mcp.Required(),
2127-
mcp.Description("Repository name"),
2127+
mcp.Description("Repository name - required for all operations"),
21282128
),
21292129
mcp.WithNumber("issue_number",
21302130
mcp.Required(),
2131-
mcp.Description("Issue number"),
2131+
mcp.Description("Issue number - required for all operations to identify the specific issue"),
21322132
),
21332133
mcp.WithArray("labels",
2134-
mcp.Description("Label names for add/remove operations (not used for list)"),
2134+
mcp.Description("Array of label names to add or remove. REQUIRED for 'add' and 'remove' operations, IGNORED for 'list' operation."),
21352135
mcp.Items(
21362136
map[string]any{
21372137
"type": "string",

0 commit comments

Comments
 (0)