Repository navigation
docs: document search_repositories repo: qualifier limitation - #49691
Merged
Merged
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
…ub MCP server guidance Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix github MCP search_repositories for repo: qualifier
docs: document search_repositories repo: qualifier limitation
Aug 2, 2026
Contributor
🔍 Triage Summary
Small doc clarification on search_repositories qualifier. Draft, low urgency. Automated triage — see the triage report for full context.
|
pelikhan
approved these changes
Aug 2, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Documents a reported search_repositories qualifier limitation, but includes inaccurate claims and unrelated generated workflow changes.
Changes:
- Adds warnings and alternative repository lookup guidance.
- Cross-references the limitation in pagination guidance.
- Changes generated smoke-test timeouts from 10 to 20 minutes.
Show a summary per file
| File | Description |
|---|---|
.github/aw/github-mcp-server.md |
Adds the qualifier warning and alternatives. |
.github/aw/github-mcp-server-pagination.md |
Adds the limitation to known quirks. |
.github/workflows/smoke-checkout-pr-dispatch.lock.yml |
Contains unrelated timeout drift from its source. |
Review details
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Suppressed comments (3)
.github/workflows/smoke-checkout-pr-dispatch.lock.yml:1536
- The detection step is also generated from the unchanged 10-minute source timeout at
.github/workflows/smoke-checkout-pr-dispatch.md:43. Keeping 20 here makes the checked-in lock inconsistent with its source; restore the compiled value.
timeout-minutes: 20
.github/workflows/smoke-checkout-pr-dispatch.lock.yml:1583
- This second generated timeout environment value must remain consistent with the source workflow's 10-minute setting. Restore 10 here as well before checking in the regenerated lock.
GH_AW_TIMEOUT_MINUTES: 20
.github/workflows/smoke-checkout-pr-dispatch.lock.yml:930
- This generated environment value conflicts with the source workflow's
timeout-minutes: 10at.github/workflows/smoke-checkout-pr-dispatch.md:43. Restore the generated 10-minute value so the runner-visible timeout agrees with the source.
GH_AW_TIMEOUT_MINUTES: 20
- Files reviewed: 3/3 changed files
- Comments generated: 5
- Review effort level: Balanced
| # --allow-tool shell(yq) | ||
| # --allow-tool write | ||
| timeout-minutes: 10 | ||
| timeout-minutes: 20 |
| | `semantic_issue_similarity_search` | Find GitHub issues semantically similar to a given issue | `owner`, `repo`, `issue_number` | | ||
| | `semantic_issues_search` | Search issues using natural language queries | `query`, `owner`, `repo` | | ||
|
|
||
| > **`search_repositories` known limitation — `repo:` qualifier is ignored**: The `repo:owner/name` qualifier has no effect in `search_repositories` queries. Instead of scoping results to the named repository, the API ranks by star count and may return a completely unrelated high-star repository as the top hit (e.g. querying `repo:github/gh-aw` may return `github/gitignore`). **Do not use `repo:` with `search_repositories`.** |
|
|
||
| > **`search_repositories` known limitation — `repo:` qualifier is ignored**: The `repo:owner/name` qualifier has no effect in `search_repositories` queries. Instead of scoping results to the named repository, the API ranks by star count and may return a completely unrelated high-star repository as the top hit (e.g. querying `repo:github/gh-aw` may return `github/gitignore`). **Do not use `repo:` with `search_repositories`.** | ||
| > | ||
| > - To check whether a specific repository exists or to fetch its metadata, use `get_file_contents` (with explicit `owner` and `repo`) or any other `repos`-toolset call that takes `owner`/`repo` directly. |
| ## Pagination | ||
|
|
||
| MCP tool responses have a **25,000 token limit**; always pass an explicit `perPage`. See [github-mcp-server-pagination.md](github-mcp-server-pagination.md) for per-tool `perPage` defaults, the pagination loop pattern, known tool quirks (`list_label`, `list_workflows`), and oversized-response recovery. | ||
| MCP tool responses have a **25,000 token limit**; always pass an explicit `perPage`. See [github-mcp-server-pagination.md](github-mcp-server-pagination.md) for per-tool `perPage` defaults, the pagination loop pattern, known tool quirks (`list_label`, `list_workflows`, `search_repositories` with `repo:`), and oversized-response recovery. |
|
|
||
| One built-in GitHub MCP tool ignores a search qualifier: | ||
|
|
||
| - **`search_repositories` with `repo:`** — the `repo:owner/name` qualifier is silently ignored; results are ranked by star count and will return unrelated high-star repositories. Use `org:`, `user:`, `topic:`, or `stars:` to scope repository searches. To resolve a specific repository, use a `repos`-toolset call with explicit `owner` and `repo` parameters (e.g. `get_file_contents`) instead. |
Contributor
|
🎉 This pull request is included in a new release. Release: |
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.
search_repositoriessilently ignores therepo:owner/namequalifier and ranks results by star count, causing agents to act on completely unrelated repositories (e.g., queryingrepo:github/gh-awreturnsgithub/gitignore).Changes
.github/aw/github-mcp-server.md— adds a warning block undersearch_repositoriesdocumenting the brokenrepo:qualifier, with correct alternatives:org:,user:,topic:,language:, orstars:qualifiersrepos-toolset call with explicitowner/repo(e.g.,get_file_contents).github/aw/github-mcp-server-pagination.md— addssearch_repositories+repo:to the Known Tool Quirks section alongside the existinglist_label/list_workflowsentries