Skip to content

Commit b9691f9

Browse files
authored
Updated description for search_code
1 parent efef8ae commit b9691f9

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

pkg/github/search.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,20 +78,21 @@ func SearchRepositories(getClient GetClientFn, t translations.TranslationHelperF
7878
// SearchCode creates a tool to search for code across GitHub repositories.
7979
func SearchCode(getClient GetClientFn, t translations.TranslationHelperFunc) (tool mcp.Tool, handler server.ToolHandlerFunc) {
8080
return mcp.NewTool("search_code",
81-
mcp.WithDescription(t("TOOL_SEARCH_CODE_DESCRIPTION", "Search for code across GitHub repositories")),
81+
// mcp.WithDescription(t("TOOL_SEARCH_CODE_DESCRIPTION", "Search for code across GitHub repositories")),
82+
mcp.WithDescription(t("TOOL_SEARCH_CODE_DESCRIPTION", "🎯 **PREFERRED**: Lexical code search across ALL GitHub repositories using GitHub's native search engine. Best for finding exact symbols, functions, classes, or specific code patterns. Use this FIRST before trying semantic alternatives - it's faster and more accurate for exact matches.")),
8283
mcp.WithToolAnnotation(mcp.ToolAnnotation{
8384
Title: t("TOOL_SEARCH_CODE_USER_TITLE", "Search code"),
8485
ReadOnlyHint: ToBoolPtr(true),
8586
}),
8687
mcp.WithString("query",
8788
mcp.Required(),
88-
mcp.Description("Search query using GitHub code search syntax"),
89+
mcp.Description("Search query using GitHub's powerful code search syntax. Examples: 'content:Skill language:Java org:github', 'NOT is:archived language:Python OR language:go'. Supports exact matching, language filters, path filters, and more."),
8990
),
9091
mcp.WithString("sort",
9192
mcp.Description("Sort field ('indexed' only)"),
9293
),
9394
mcp.WithString("order",
94-
mcp.Description("Sort order"),
95+
mcp.Description("Sort order for results"),
9596
mcp.Enum("asc", "desc"),
9697
),
9798
WithPagination(),

0 commit comments

Comments
 (0)