Conversation
4fc70e3 to
2583fd0
Compare
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR separates organization searches from user searches by introducing dedicated tools and refactoring common logic.
- Registers a new
orgstoolset inInitToolsets. - Refactors search handlers with
userOrOrgHandlerand adds a (currently unused)minimalAccountSearchHandler. - Implements
SearchOrgsfunction and its tests insearch_test.go.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| pkg/github/tools.go | Added and registered "orgs" toolset alongside existing toolsets |
| pkg/github/search.go | Refactored search logic, added userOrOrgHandler, SearchOrgs, and residual minimalAccountSearchHandler |
| pkg/github/search_test.go | Added Test_SearchOrgs suite to validate organization search tool |
Comments suppressed due to low confidence (3)
pkg/github/search.go:163
- The
minimalAccountSearchHandlerfunction is never used. Consider removing it or integrating it into theuserOrOrgHandlerto avoid dead code.
func minimalAccountSearchHandler(accountType string, query string, getClient GetClientFn, ctx context.Context, sort, order string, pagination PaginationParams) {
pkg/github/search.go:335
- [nitpick] The translation key
TOOL_SEARCH_ORGS_USER_TITLEincludesUSERalthough this is for organizations; consider renaming it toTOOL_SEARCH_ORGS_TITLEfor consistency.
mcp.WithToolAnnotation(mcp.ToolAnnotation{ Title: t("TOOL_SEARCH_ORGS_USER_TITLE", "Search organizations"),
pkg/github/search_test.go:521
- [nitpick] Tests for
SearchOrgscover the default pagination but don’t verify behavior when non-defaultsort,order, or pagination parameters are provided. Consider adding cases to cover those parameters.
requestArgs: map[string]interface{}{
52d0bf0 to
6c70992
Compare
caea5e0 to
ba7bc51
Compare
ba7bc51 to
65040d1
Compare
65040d1 to
f316981
Compare
JoannaaKL
approved these changes
Jun 26, 2025
SamMorrowDrums
added a commit
that referenced
this pull request
Jun 26, 2025
nickytonline
pushed a commit
to nickytonline/github-mcp-http
that referenced
this pull request
Oct 4, 2025
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.
In order to make separation of certain objects more clear we should separate them. This means orgs and users are not the same.
A follow-up will be to separate issue and PR search by also scoping the queries and producing separate functions. It is best for the LLM that it has clear boundaries, and concepts are consistent, rather than accepting the legacy API quirks.