Skip to main content
Glama

search_users

Search for GitHub users by query, sorting by followers, repositories, or join date, and paginate results to streamline user discovery and management.

Instructions

Search for users on GitHub

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
orderNo
pageNo
per_pageNo
qYes
sortNo

Implementation Reference

  • The main handler function that executes the tool logic by calling the GitHub search users API.
    export async function searchUsers(github_pat: string, params: z.infer<typeof SearchUsersSchema>) { return githubRequest(github_pat, buildUrl("https://api.github.com/search/users", params)); }
  • Zod schemas for input validation of the search_users tool: SearchUsersSchema (user params) and _SearchUsersSchema (with github_pat).
    export const SearchUsersSchema = SearchUsersOptions; export const _SearchUsersSchema = SearchUsersSchema.extend({ github_pat: z.string().describe("GitHub Personal Access Token"), });
  • src/index.ts:154-157 (registration)
    Registers the search_users tool in the MCP server's listTools response, providing name, description, and input schema.
    name: "search_users", description: "Search for users on GitHub", inputSchema: zodToJsonSchema(search.SearchUsersSchema), },
  • src/index.ts:473-480 (registration)
    Dispatches the search_users tool call in the MCP server's CallToolRequest handler by parsing arguments and invoking the handler function.
    case "search_users": { const argsWithPat = search._SearchUsersSchema.parse(params.arguments); const { github_pat, ...args } = argsWithPat; const results = await search.searchUsers(github_pat, 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/MissionSquad/mcp-github'

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