Skip to content

Conversation

kerobbi
Copy link
Contributor

@kerobbi kerobbi commented Oct 8, 2025

This PR adds explicit sort and order params to the search_repositories tool to align with other search_* tools, especially as the relevant REST API endpoint does accept them. Additionally, it adds server instructions for search_* tools related to sorting functionality.

Changes

  • Added sort param with enum values: stars, forks, help-wanted-issues, updated
  • Added order param with enum values: asc, desc
  • Added server instructions for sort and order usage in search_* tools

Closes: #1178

@kerobbi kerobbi requested a review from a team as a code owner October 8, 2025 11:48
@Copilot Copilot AI review requested due to automatic review settings October 8, 2025 11:48
Copy link
Contributor

@Copilot Copilot AI left a 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 adds explicit sorting parameters to the search_repositories tool to improve model clarity when sorting search results. It aligns the tool's interface with other search tools by exposing the GitHub API's native sorting capabilities.

  • Added sort parameter with enum values for different sorting criteria (stars, forks, help-wanted-issues, updated)
  • Added order parameter with enum values for sort direction (asc, desc)
  • Updated tests and documentation to reflect the new parameters

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
pkg/github/search.go Implements the new sort and order parameters in the tool definition and request handling
pkg/github/search_test.go Adds test coverage for the new parameters in both schema validation and API call verification
pkg/github/toolsnaps/search_repositories.snap Updates the tool schema snapshot to include the new parameter definitions
README.md Documents the new sort and order parameters in the tool reference

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@kerobbi kerobbi merged commit 16b43c9 into main Oct 9, 2025
16 checks passed
@kerobbi kerobbi deleted the improve-search-repositories-tool branch October 9, 2025 09:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

search_repositories tool giving wrong output

2 participants