Tommy/(Bug-fix): adjust tool description to account for author in prompt #658
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_requests
tool, 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_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)
