diff --git a/pkg/github/code_scanning.go b/pkg/github/code_scanning.go index 4fc029bf..5dbac0d5 100644 --- a/pkg/github/code_scanning.go +++ b/pkg/github/code_scanning.go @@ -86,11 +86,13 @@ func ListCodeScanningAlerts(getClient GetClientFn, t translations.TranslationHel mcp.Description("The Git reference for the results you want to list."), ), mcp.WithString("state", - mcp.Description("State of the code scanning alerts to list. Set to closed to list only closed code scanning alerts. Default: open"), + mcp.Description("Filter code scanning alerts by state. Defaults to open"), mcp.DefaultString("open"), + mcp.Enum("open", "closed", "dismissed", "fixed"), ), mcp.WithString("severity", - mcp.Description("Only code scanning alerts with this severity will be returned. Possible values are: critical, high, medium, low, warning, note, error."), + mcp.Description("Filter code scanning alerts by severity"), + mcp.Enum("critical", "high", "medium", "low", "warning", "note", "error"), ), ), func(ctx context.Context, request mcp.CallToolRequest) (*mcp.CallToolResult, error) { diff --git a/pkg/github/issues.go b/pkg/github/issues.go index 16c34141..1324bd56 100644 --- a/pkg/github/issues.go +++ b/pkg/github/issues.go @@ -90,7 +90,7 @@ func AddIssueComment(getClient GetClientFn, t translations.TranslationHelperFunc ), mcp.WithString("body", mcp.Required(), - mcp.Description("Comment text"), + mcp.Description("Comment content"), ), ), func(ctx context.Context, request mcp.CallToolRequest) (*mcp.CallToolResult, error) { @@ -151,7 +151,7 @@ func SearchIssues(getClient GetClientFn, t translations.TranslationHelperFunc) ( mcp.Description("Search query using GitHub issues search syntax"), ), mcp.WithString("sort", - mcp.Description("Sort field (comments, reactions, created, etc.)"), + mcp.Description("Sort field by number of matches of categories, defaults to best match"), mcp.Enum( "comments", "reactions", @@ -167,7 +167,7 @@ func SearchIssues(getClient GetClientFn, t translations.TranslationHelperFunc) ( ), ), mcp.WithString("order", - mcp.Description("Sort order ('asc' or 'desc')"), + mcp.Description("Sort order"), mcp.Enum("asc", "desc"), ), WithPagination(), @@ -357,7 +357,7 @@ func ListIssues(getClient GetClientFn, t translations.TranslationHelperFunc) (to mcp.Description("Repository name"), ), mcp.WithString("state", - mcp.Description("Filter by state ('open', 'closed', 'all')"), + mcp.Description("Filter by state"), mcp.Enum("open", "closed", "all"), ), mcp.WithArray("labels", @@ -369,11 +369,11 @@ func ListIssues(getClient GetClientFn, t translations.TranslationHelperFunc) (to ), ), mcp.WithString("sort", - mcp.Description("Sort by ('created', 'updated', 'comments')"), + mcp.Description("Sort order"), mcp.Enum("created", "updated", "comments"), ), mcp.WithString("direction", - mcp.Description("Sort direction ('asc', 'desc')"), + mcp.Description("Sort direction"), mcp.Enum("asc", "desc"), ), mcp.WithString("since", @@ -485,7 +485,7 @@ func UpdateIssue(getClient GetClientFn, t translations.TranslationHelperFunc) (t mcp.Description("New description"), ), mcp.WithString("state", - mcp.Description("New state ('open' or 'closed')"), + mcp.Description("New state"), mcp.Enum("open", "closed"), ), mcp.WithArray("labels", diff --git a/pkg/github/pullrequests.go b/pkg/github/pullrequests.go index fd9420d7..2be249c8 100644 --- a/pkg/github/pullrequests.go +++ b/pkg/github/pullrequests.go @@ -94,7 +94,7 @@ func UpdatePullRequest(getClient GetClientFn, t translations.TranslationHelperFu mcp.Description("New description"), ), mcp.WithString("state", - mcp.Description("New state ('open' or 'closed')"), + mcp.Description("New state"), mcp.Enum("open", "closed"), ), mcp.WithString("base", @@ -201,7 +201,8 @@ func ListPullRequests(getClient GetClientFn, t translations.TranslationHelperFun mcp.Description("Repository name"), ), mcp.WithString("state", - mcp.Description("Filter by state ('open', 'closed', 'all')"), + mcp.Description("Filter by state"), + mcp.Enum("open", "closed", "all"), ), mcp.WithString("head", mcp.Description("Filter by head user/org and branch"), @@ -210,10 +211,12 @@ func ListPullRequests(getClient GetClientFn, t translations.TranslationHelperFun mcp.Description("Filter by base branch"), ), mcp.WithString("sort", - mcp.Description("Sort by ('created', 'updated', 'popularity', 'long-running')"), + mcp.Description("Sort by"), + mcp.Enum("created", "updated", "popularity", "long-running"), ), mcp.WithString("direction", - mcp.Description("Sort direction ('asc', 'desc')"), + mcp.Description("Sort direction"), + mcp.Enum("asc", "desc"), ), WithPagination(), ), @@ -313,7 +316,8 @@ func MergePullRequest(getClient GetClientFn, t translations.TranslationHelperFun mcp.Description("Extra detail for merge commit"), ), mcp.WithString("merge_method", - mcp.Description("Merge method ('merge', 'squash', 'rebase')"), + mcp.Description("Merge method"), + mcp.Enum("merge", "squash", "rebase"), ), ), func(ctx context.Context, request mcp.CallToolRequest) (*mcp.CallToolResult, error) { @@ -671,21 +675,21 @@ func AddPullRequestReviewComment(getClient GetClientFn, t translations.Translati mcp.Description("The relative path to the file that necessitates a comment. Required unless in_reply_to is specified."), ), mcp.WithString("subject_type", - mcp.Description("The level at which the comment is targeted, 'line' or 'file'"), + mcp.Description("The level at which the comment is targeted"), mcp.Enum("line", "file"), ), mcp.WithNumber("line", mcp.Description("The line of the blob in the pull request diff that the comment applies to. For multi-line comments, the last line of the range"), ), mcp.WithString("side", - mcp.Description("The side of the diff to comment on. Can be LEFT or RIGHT"), + mcp.Description("The side of the diff to comment on"), mcp.Enum("LEFT", "RIGHT"), ), mcp.WithNumber("start_line", mcp.Description("For multi-line comments, the first line of the range that the comment applies to"), ), mcp.WithString("start_side", - mcp.Description("For multi-line comments, the starting side of the diff that the comment applies to. Can be LEFT or RIGHT"), + mcp.Description("For multi-line comments, the starting side of the diff that the comment applies to"), mcp.Enum("LEFT", "RIGHT"), ), mcp.WithNumber("in_reply_to", @@ -893,7 +897,8 @@ func CreatePullRequestReview(getClient GetClientFn, t translations.TranslationHe ), mcp.WithString("event", mcp.Required(), - mcp.Description("Review action ('APPROVE', 'REQUEST_CHANGES', 'COMMENT')"), + mcp.Description("Review action to perform"), + mcp.Enum("APPROVE", "REQUEST_CHANGES", "COMMENT"), ), mcp.WithString("commitId", mcp.Description("SHA of commit to review"), diff --git a/pkg/github/repositories.go b/pkg/github/repositories.go index 1d74dcfb..51948730 100644 --- a/pkg/github/repositories.go +++ b/pkg/github/repositories.go @@ -93,7 +93,7 @@ func ListCommits(getClient GetClientFn, t translations.TranslationHelperFunc) (t mcp.Description("Repository name"), ), mcp.WithString("sha", - mcp.Description("Branch name"), + mcp.Description("SHA or Branch name"), ), WithPagination(), ), diff --git a/pkg/github/search.go b/pkg/github/search.go index 75810e24..dc85c177 100644 --- a/pkg/github/search.go +++ b/pkg/github/search.go @@ -78,7 +78,7 @@ func SearchCode(getClient GetClientFn, t translations.TranslationHelperFunc) (to mcp.Description("Sort field ('indexed' only)"), ), mcp.WithString("order", - mcp.Description("Sort order ('asc' or 'desc')"), + mcp.Description("Sort order"), mcp.Enum("asc", "desc"), ), WithPagination(), @@ -147,11 +147,11 @@ func SearchUsers(getClient GetClientFn, t translations.TranslationHelperFunc) (t mcp.Description("Search query using GitHub users search syntax"), ), mcp.WithString("sort", - mcp.Description("Sort field (followers, repositories, joined)"), + mcp.Description("Sort field by category"), mcp.Enum("followers", "repositories", "joined"), ), mcp.WithString("order", - mcp.Description("Sort order ('asc' or 'desc')"), + mcp.Description("Sort order"), mcp.Enum("asc", "desc"), ), WithPagination(),