- Notifications
You must be signed in to change notification settings - Fork1.4k
Tommy/(Bug-fix): adjust tool description to account for author in prompt#658
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Tommy/(Bug-fix): adjust tool description to account for author in prompt#658
Uh oh!
There was an error while loading.Please reload this page.
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Pull Request Overview
This PR fixes a bug where thelist_pull_requests
tool was being selected for author-specific queries, despite not supporting author filtering due to GitHub API constraints. The fix updates the tool description to explicitly direct models to usesearch_pull_requests
instead when an author is specified.
Key Changes:
- Updated tool description to include explicit guidance against using this tool for author-specific queries
- Removed an unnecessary blank line for code cleanliness
- Updated corresponding test snapshot to reflect the description change
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
pkg/github/pullrequests.go | Updated tool description to redirect author queries to search_pull_requests tool |
pkg/github/toolsnaps/list_pull_requests.snap | Updated test snapshot to match new tool description |
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
42e5ce9
intogithub:mainUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Overview
This PR fixes a buggy behaviour which occurs when the user uses the Github MCP to query PRs by author (e.g. by asking "show me my last 10 PRs in repo xyz") and the MCP uses the
list_pull_requests
tool, which does not support author-specific queries due to constraints in the Github API (see official APIdocs).To fix this issue, this PR changes the
list_pull_requests
tool description to ensure that thesearch_pull_requests
tool is selected when the user requests PRs by author.Testing
This solution seems to work as expected across all models. The only caveat is that o4-mini sometimes doesn't seem to always use the
get_me
tool to get the user information before using thesearch_pull_requests
tool (it does sometimes, as shown in the last screenshot). This behaviour should be investigated further but I don't believe it's specific to this PR.Demo - Claude 4

Demo - ChatGTP 4.1

Demo - ChatGPT 4.0

Demo - ChatGPT o4-mini (without get-me)

Demo - ChatGPT o4-mini (with get-me)
