Skip to main content
Glama

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
NameRequiredDescriptionDefault
orderNo
pageNo
per_pageNo
qYes
sortNo

Implementation Reference

  • 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)); }
  • Zod schema extension defining options specific to user search (sort field).
    export const SearchUsersOptions = SearchOptions.extend({ sort: z.enum(["followers", "repositories", "joined"]).optional(), });
  • 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) }], }; }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/tuanle96/mcp-github'

If you have feedback or need assistance with the MCP directory API, please join our Discord server