Skip to content

Commit 4b64121

Browse files
authored
Updated descriptions for search tools (#737)
* Updated description for search_code * Update toolsnaps and docs
1 parent 771d7b4 commit 4b64121

File tree

5 files changed

+26
-24
lines changed

5 files changed

+26
-24
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -611,7 +611,7 @@ The following sets of tools are available (all are on by default):
611611
- `order`: Sort order (string, optional)
612612
- `page`: Page number for pagination (min 1) (number, optional)
613613
- `perPage`: Results per page for pagination (min 1, max 100) (number, optional)
614-
- `query`: Search query using GitHub organizations search syntax scoped to type:org (string, required)
614+
- `query`: Organization search query. Examples: 'microsoft', 'location:california', 'created:>=2025-01-01'. Search is automatically scoped to type:org. (string, required)
615615
- `sort`: Sort field by category (string, optional)
616616

617617
</details>
@@ -836,16 +836,16 @@ The following sets of tools are available (all are on by default):
836836
- `repo`: Repository name (string, required)
837837

838838
- **search_code** - Search code
839-
- `order`: Sort order (string, optional)
839+
- `order`: Sort order for results (string, optional)
840840
- `page`: Page number for pagination (min 1) (number, optional)
841841
- `perPage`: Results per page for pagination (min 1, max 100) (number, optional)
842-
- `query`: Search query using GitHub code search syntax (string, required)
842+
- `query`: Search query using GitHub's powerful code search syntax. Examples: 'content:Skill language:Java org:github', 'NOT is:archived language:Python OR language:go', 'repo:github/github-mcp-server'. Supports exact matching, language filters, path filters, and more. (string, required)
843843
- `sort`: Sort field ('indexed' only) (string, optional)
844844

845845
- **search_repositories** - Search repositories
846846
- `page`: Page number for pagination (min 1) (number, optional)
847847
- `perPage`: Results per page for pagination (min 1, max 100) (number, optional)
848-
- `query`: Search query (string, required)
848+
- `query`: Repository search query. Examples: 'machine learning in:name stars:>1000 language:python', 'topic:react', 'user:facebook'. Supports advanced search syntax for precise filtering. (string, required)
849849

850850
</details>
851851

@@ -875,8 +875,8 @@ The following sets of tools are available (all are on by default):
875875
- `order`: Sort order (string, optional)
876876
- `page`: Page number for pagination (min 1) (number, optional)
877877
- `perPage`: Results per page for pagination (min 1, max 100) (number, optional)
878-
- `query`: Search query using GitHub users search syntax scoped to type:user (string, required)
879-
- `sort`: Sort field by category (string, optional)
878+
- `query`: User search query. Examples: 'john smith', 'location:seattle', 'followers:>100'. Search is automatically scoped to type:user. (string, required)
879+
- `sort`: Sort users by number of followers or repositories, or when the person joined GitHub. (string, optional)
880880

881881
</details>
882882
<!-- END AUTOMATED TOOLS -->

pkg/github/__toolsnaps__/search_code.snap

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
"title": "Search code",
44
"readOnlyHint": true
55
},
6-
"description": "Search for code across GitHub repositories",
6+
"description": "Fast and precise code search across ALL GitHub repositories using GitHub's native search engine. Best for finding exact symbols, functions, classes, or specific code patterns.",
77
"inputSchema": {
88
"properties": {
99
"order": {
10-
"description": "Sort order",
10+
"description": "Sort order for results",
1111
"enum": [
1212
"asc",
1313
"desc"
@@ -26,7 +26,7 @@
2626
"type": "number"
2727
},
2828
"query": {
29-
"description": "Search query using GitHub code search syntax",
29+
"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', 'repo:github/github-mcp-server'. Supports exact matching, language filters, path filters, and more.",
3030
"type": "string"
3131
},
3232
"sort": {

pkg/github/__toolsnaps__/search_repositories.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"title": "Search repositories",
44
"readOnlyHint": true
55
},
6-
"description": "Search for GitHub repositories",
6+
"description": "Find GitHub repositories by name, description, readme, topics, or other metadata. Perfect for discovering projects, finding examples, or locating specific repositories across GitHub.",
77
"inputSchema": {
88
"properties": {
99
"page": {
@@ -18,7 +18,7 @@
1818
"type": "number"
1919
},
2020
"query": {
21-
"description": "Search query",
21+
"description": "Repository search query. Examples: 'machine learning in:name stars:\u003e1000 language:python', 'topic:react', 'user:facebook'. Supports advanced search syntax for precise filtering.",
2222
"type": "string"
2323
}
2424
},

pkg/github/__toolsnaps__/search_users.snap

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"title": "Search users",
44
"readOnlyHint": true
55
},
6-
"description": "Search for GitHub users exclusively",
6+
"description": "Find GitHub users by username, real name, or other profile information. Useful for locating developers, contributors, or team members.",
77
"inputSchema": {
88
"properties": {
99
"order": {
@@ -26,11 +26,11 @@
2626
"type": "number"
2727
},
2828
"query": {
29-
"description": "Search query using GitHub users search syntax scoped to type:user",
29+
"description": "User search query. Examples: 'john smith', 'location:seattle', 'followers:\u003e100'. Search is automatically scoped to type:user.",
3030
"type": "string"
3131
},
3232
"sort": {
33-
"description": "Sort field by category",
33+
"description": "Sort users by number of followers or repositories, or when the person joined GitHub.",
3434
"enum": [
3535
"followers",
3636
"repositories",

pkg/github/search.go

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,15 @@ import (
1616
// SearchRepositories creates a tool to search for GitHub repositories.
1717
func SearchRepositories(getClient GetClientFn, t translations.TranslationHelperFunc) (tool mcp.Tool, handler server.ToolHandlerFunc) {
1818
return mcp.NewTool("search_repositories",
19-
mcp.WithDescription(t("TOOL_SEARCH_REPOSITORIES_DESCRIPTION", "Search for GitHub repositories")),
19+
mcp.WithDescription(t("TOOL_SEARCH_REPOSITORIES_DESCRIPTION", "Find GitHub repositories by name, description, readme, topics, or other metadata. Perfect for discovering projects, finding examples, or locating specific repositories across GitHub.")),
20+
2021
mcp.WithToolAnnotation(mcp.ToolAnnotation{
2122
Title: t("TOOL_SEARCH_REPOSITORIES_USER_TITLE", "Search repositories"),
2223
ReadOnlyHint: ToBoolPtr(true),
2324
}),
2425
mcp.WithString("query",
2526
mcp.Required(),
26-
mcp.Description("Search query"),
27+
mcp.Description("Repository search query. Examples: 'machine learning in:name stars:>1000 language:python', 'topic:react', 'user:facebook'. Supports advanced search syntax for precise filtering."),
2728
),
2829
WithPagination(),
2930
),
@@ -78,20 +79,20 @@ func SearchRepositories(getClient GetClientFn, t translations.TranslationHelperF
7879
// SearchCode creates a tool to search for code across GitHub repositories.
7980
func SearchCode(getClient GetClientFn, t translations.TranslationHelperFunc) (tool mcp.Tool, handler server.ToolHandlerFunc) {
8081
return mcp.NewTool("search_code",
81-
mcp.WithDescription(t("TOOL_SEARCH_CODE_DESCRIPTION", "Search for code across GitHub repositories")),
82+
mcp.WithDescription(t("TOOL_SEARCH_CODE_DESCRIPTION", "Fast and precise code search across ALL GitHub repositories using GitHub's native search engine. Best for finding exact symbols, functions, classes, or specific code patterns.")),
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', 'repo:github/github-mcp-server'. 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(),
@@ -258,17 +259,17 @@ func userOrOrgHandler(accountType string, getClient GetClientFn) server.ToolHand
258259
// SearchUsers creates a tool to search for GitHub users.
259260
func SearchUsers(getClient GetClientFn, t translations.TranslationHelperFunc) (tool mcp.Tool, handler server.ToolHandlerFunc) {
260261
return mcp.NewTool("search_users",
261-
mcp.WithDescription(t("TOOL_SEARCH_USERS_DESCRIPTION", "Search for GitHub users exclusively")),
262+
mcp.WithDescription(t("TOOL_SEARCH_USERS_DESCRIPTION", "Find GitHub users by username, real name, or other profile information. Useful for locating developers, contributors, or team members.")),
262263
mcp.WithToolAnnotation(mcp.ToolAnnotation{
263264
Title: t("TOOL_SEARCH_USERS_USER_TITLE", "Search users"),
264265
ReadOnlyHint: ToBoolPtr(true),
265266
}),
266267
mcp.WithString("query",
267268
mcp.Required(),
268-
mcp.Description("Search query using GitHub users search syntax scoped to type:user"),
269+
mcp.Description("User search query. Examples: 'john smith', 'location:seattle', 'followers:>100'. Search is automatically scoped to type:user."),
269270
),
270271
mcp.WithString("sort",
271-
mcp.Description("Sort field by category"),
272+
mcp.Description("Sort users by number of followers or repositories, or when the person joined GitHub."),
272273
mcp.Enum("followers", "repositories", "joined"),
273274
),
274275
mcp.WithString("order",
@@ -282,14 +283,15 @@ func SearchUsers(getClient GetClientFn, t translations.TranslationHelperFunc) (t
282283
// SearchOrgs creates a tool to search for GitHub organizations.
283284
func SearchOrgs(getClient GetClientFn, t translations.TranslationHelperFunc) (tool mcp.Tool, handler server.ToolHandlerFunc) {
284285
return mcp.NewTool("search_orgs",
285-
mcp.WithDescription(t("TOOL_SEARCH_ORGS_DESCRIPTION", "Search for GitHub organizations exclusively")),
286+
mcp.WithDescription(t("TOOL_SEARCH_ORGS_DESCRIPTION", "Find GitHub organizations by name, location, or other organization metadata. Ideal for discovering companies, open source foundations, or teams.")),
287+
286288
mcp.WithToolAnnotation(mcp.ToolAnnotation{
287289
Title: t("TOOL_SEARCH_ORGS_USER_TITLE", "Search organizations"),
288290
ReadOnlyHint: ToBoolPtr(true),
289291
}),
290292
mcp.WithString("query",
291293
mcp.Required(),
292-
mcp.Description("Search query using GitHub organizations search syntax scoped to type:org"),
294+
mcp.Description("Organization search query. Examples: 'microsoft', 'location:california', 'created:>=2025-01-01'. Search is automatically scoped to type:org."),
293295
),
294296
mcp.WithString("sort",
295297
mcp.Description("Sort field by category"),

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy