Skip to content

Commit 4c07a86

Browse files
committed
add toolsnap for search_orgs
1 parent 4fc5b80 commit 4c07a86

File tree

2 files changed

+50
-0
lines changed

2 files changed

+50
-0
lines changed
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
{
2+
"annotations": {
3+
"readOnlyHint": true,
4+
"title": "Search organizations"
5+
},
6+
"description": "Find GitHub organizations by name, location, or other organization metadata. Ideal for discovering companies, open source foundations, or teams.",
7+
"inputSchema": {
8+
"type": "object",
9+
"required": [
10+
"query"
11+
],
12+
"properties": {
13+
"order": {
14+
"type": "string",
15+
"description": "Sort order",
16+
"enum": [
17+
"asc",
18+
"desc"
19+
]
20+
},
21+
"page": {
22+
"type": "number",
23+
"description": "Page number for pagination (min 1)",
24+
"minimum": 1
25+
},
26+
"perPage": {
27+
"type": "number",
28+
"description": "Results per page for pagination (min 1, max 100)",
29+
"minimum": 1,
30+
"maximum": 100
31+
},
32+
"query": {
33+
"type": "string",
34+
"description": "Organization search query. Examples: 'microsoft', 'location:california', 'created:\u003e=2025-01-01'. Search is automatically scoped to type:org."
35+
},
36+
"sort": {
37+
"type": "string",
38+
"description": "Sort field by category",
39+
"enum": [
40+
"followers",
41+
"repositories",
42+
"joined"
43+
]
44+
}
45+
}
46+
},
47+
"name": "search_orgs"
48+
}

pkg/github/search_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -596,6 +596,8 @@ func Test_SearchOrgs(t *testing.T) {
596596
mockClient := github.NewClient(nil)
597597
tool, _ := SearchOrgs(stubGetClientFn(mockClient), translations.NullTranslationHelper)
598598

599+
require.NoError(t, toolsnaps.Test(tool.Name, tool))
600+
599601
assert.Equal(t, "search_orgs", tool.Name)
600602
assert.NotEmpty(t, tool.Description)
601603

0 commit comments

Comments
 (0)