Skip to content

Commit 82addb7

Browse files
committed
adjust tool description
1 parent 89bb928 commit 82addb7

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

pkg/github/pullrequests.go

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ func UpdatePullRequest(getClient GetClientFn, t translations.TranslationHelperFu
330330
// ListPullRequests creates a tool to list and filter repository pull requests.
331331
func ListPullRequests(getClient GetClientFn, t translations.TranslationHelperFunc) (mcp.Tool, server.ToolHandlerFunc) {
332332
return mcp.NewTool("list_pull_requests",
333-
mcp.WithDescription(t("TOOL_LIST_PULL_REQUESTS_DESCRIPTION", "List pull requests in a GitHub repository.")),
333+
mcp.WithDescription(t("TOOL_LIST_PULL_REQUESTS_DESCRIPTION", "List pull requests in a GitHub repository. If the user specifies an author, then DO NOT use this tool, use the search_pull_requests tool instead.")),
334334
mcp.WithToolAnnotation(mcp.ToolAnnotation{
335335
Title: t("TOOL_LIST_PULL_REQUESTS_USER_TITLE", "List pull requests"),
336336
ReadOnlyHint: ToBoolPtr(true),
@@ -361,6 +361,10 @@ func ListPullRequests(getClient GetClientFn, t translations.TranslationHelperFun
361361
mcp.Description("Sort direction"),
362362
mcp.Enum("asc", "desc"),
363363
),
364+
mcp.WithString("author",
365+
mcp.Description("Filter by author username."),
366+
),
367+
364368
WithPagination(),
365369
),
366370
func(ctx context.Context, request mcp.CallToolRequest) (*mcp.CallToolResult, error) {
@@ -392,11 +396,13 @@ func ListPullRequests(getClient GetClientFn, t translations.TranslationHelperFun
392396
if err != nil {
393397
return mcp.NewToolResultError(err.Error()), nil
394398
}
399+
if err != nil {
400+
return mcp.NewToolResultError(err.Error()), nil
401+
}
395402
pagination, err := OptionalPaginationParams(request)
396403
if err != nil {
397404
return mcp.NewToolResultError(err.Error()), nil
398405
}
399-
400406
opts := &github.PullRequestListOptions{
401407
State: state,
402408
Head: head,

0 commit comments

Comments
 (0)