Skip to main content
Glama

search_users

Identify specific GitHub users by querying their profiles, sorting results by followers, repositories, or join date, and managing pagination for efficient user discovery.

Instructions

Search for users on GitHub

Input Schema

NameRequiredDescriptionDefault
orderNo
pageNo
per_pageNo
qYes
sortNo

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "order": { "enum": [ "asc", "desc" ], "type": "string" }, "page": { "minimum": 1, "type": "number" }, "per_page": { "maximum": 100, "minimum": 1, "type": "number" }, "q": { "type": "string" }, "sort": { "enum": [ "followers", "repositories", "joined" ], "type": "string" } }, "required": [ "q" ], "type": "object" }

Implementation Reference

  • Core handler function that executes the 'search_users' tool logic by constructing the GitHub search/users API URL and making the request.
    export async function searchUsers(params: z.infer<typeof SearchUsersSchema>) { return githubRequest(buildUrl("https://api.github.com/search/users", params)); }
  • Zod schema definition for search_users input parameters, extending the base SearchOptions with user-specific sort options. Exported as SearchUsersSchema.
    export const SearchUsersOptions = SearchOptions.extend({ sort: z.enum(["followers", "repositories", "joined"]).optional(), });
  • index.ts:148-152 (registration)
    Registration of the 'search_users' tool in the server's listTools handler, including name, description, and input schema.
    { name: "search_users", description: "Search for users on GitHub", inputSchema: zodToJsonSchema(search.SearchUsersSchema), },
  • Handler case in the main CallToolRequest switch statement that parses arguments, calls the searchUsers function, and formats the response.
    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/PhialsBasement/mcp-github-server-plus'

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