search_users
Enables searching GitHub users by query, sorting results by followers, repositories, or join date, and paginating to refine results efficiently.
Instructions
Search for users on GitHub
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| order | No | ||
| page | No | ||
| per_page | No | ||
| q | Yes | ||
| sort | No |
Implementation Reference
- operations/search.ts:43-45 (handler)The handler function that performs the GitHub API search for users.export async function searchUsers(params: z.infer<typeof SearchUsersSchema>) { return githubRequest(buildUrl("https://api.github.com/search/users", params)); }
- operations/search.ts:11-13 (schema)Zod schema extension defining options specific to user search (sort field).export const SearchUsersOptions = SearchOptions.extend({ sort: z.enum(["followers", "repositories", "joined"]).optional(), });
- operations/search.ts:32-32 (schema)Export of the input schema for the search_users tool.export const SearchUsersSchema = SearchUsersOptions;
- index.ts:146-149 (registration)Registration of the search_users tool in the listTools response.name: "search_users", description: "Search for users on GitHub", inputSchema: zodToJsonSchema(search.SearchUsersSchema), },
- index.ts:433-439 (registration)Dispatch logic in the callToolRequest handler that parses args and calls the handler.case "search_users": { const args = search.SearchUsersSchema.parse(request.params.arguments); const results = await search.searchUsers(args); return { content: [{ type: "text", text: JSON.stringify(results, null, 2) }], }; }