Skip to content

docs: document search_repositories repo: qualifier limitation - #49691

Merged
pelikhan merged 3 commits into
mainfrom
copilot/deep-report-fix-repo-qualifier-issue
Aug 2, 2026
Merged

pelikhan merged 3 commits into
mainfrom
copilot/deep-report-fix-repo-qualifier-issue

Conversation

Copilot AI commented Aug 2, 2026 •

Copy link
Copy Markdown
Contributor

search_repositories silently ignores the repo:owner/name qualifier and ranks results by star count, causing agents to act on completely unrelated repositories (e.g., querying repo:github/gh-aw returns github/gitignore).

Changes

  • .github/aw/github-mcp-server.md — adds a warning block under search_repositories documenting the broken repo: qualifier, with correct alternatives:
    • Repository discovery: use org:, user:, topic:, language:, or stars: qualifiers
    • Single-repo resolution: use a repos-toolset call with explicit owner/repo (e.g., get_file_contents)
  • .github/aw/github-mcp-server-pagination.md — adds search_repositories + repo: to the Known Tool Quirks section alongside the existing list_label / list_workflows entries

Copilot AI and others added 2 commits August 2, 2026 01:54
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
Copilot AI requested a review from pelikhan August 2, 2026 02:01
@github-actions

github-actions Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

🔍 Triage Summary

Field Value
Category docs
Risk low
Priority low
Score 25/100 (impact 10 + urgency 5 + quality 10)
Recommended action defer
Batch —

Small doc clarification on search_repositories qualifier. Draft, low urgency.

Automated triage — see the triage report for full context.

Generated by 🔧 PR Triage Agent · auto · 40.3 AIC · ⌖ 4.01 AIC · ⊞ 8K · ◷

@pelikhan
pelikhan marked this pull request as ready for review August 2, 2026 09:44
Copilot AI review requested due to automatic review settings August 2, 2026 09:44
@pelikhan
pelikhan merged commit a46bc4b into main Aug 2, 2026
@pelikhan
pelikhan deleted the copilot/deep-report-fix-repo-qualifier-issue branch August 2, 2026 09:44

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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: 10 at .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.
@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v0.84.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[deep-report] github MCP search_repositories ignores repo: qualifier, returns unrelated top hit

3 participants