Skip to content

Commit 42e5ce9

Browse files
authored
Tommy/(Bug-fix): adjust tool description to account for author in prompt (#658)
* adjust tool description * removed dead code * improve desription * update description for tests
1 parent 89bb928 commit 42e5ce9

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

pkg/github/__toolsnaps__/list_pull_requests.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"title": "List pull requests",
44
"readOnlyHint": true
55
},
6-
"description": "List pull requests in a GitHub repository.",
6+
"description": "List pull requests in a GitHub repository. If the user specifies an author, then DO NOT use this tool and use the search_pull_requests tool instead.",
77
"inputSchema": {
88
"properties": {
99
"base": {

pkg/github/pullrequests.go

Lines changed: 1 addition & 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 and 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),
@@ -396,7 +396,6 @@ func ListPullRequests(getClient GetClientFn, t translations.TranslationHelperFun
396396
if err != nil {
397397
return mcp.NewToolResultError(err.Error()), nil
398398
}
399-
400399
opts := &github.PullRequestListOptions{
401400
State: state,
402401
Head: head,

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy