Tommy/(Bug-fix): adjust tool description to account for author in prompt#658
Merged
tommaso-moro merged 4 commits intogithub:mainfrom Jul 11, 2025
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR fixes a bug where the list_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 use search_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 |
LuluBeatson
approved these changes
Jul 10, 2025
nickytonline
pushed a commit
to nickytonline/github-mcp-http
that referenced
this pull request
Oct 4, 2025
…mpt (github#658) * adjust tool description * removed dead code * improve desription * update description for tests
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

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_requeststool, which does not support author-specific queries due to constraints in the Github API (see official API docs).To fix this issue, this PR changes the
list_pull_requeststool description to ensure that thesearch_pull_requeststool 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_metool to get the user information before using thesearch_pull_requeststool (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)
