search_repositories
Find GitHub repositories by query and language to access code projects through the Multi-MCPs server's unified API integration.
Instructions
Search GitHub repositories
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | ||
| language | No |
Implementation Reference
- src/apis/github/github.ts:92-98 (handler)The primary handler function for the 'search_repositories' tool. Validates configuration and arguments, then calls the GitHub client's search method.async search_repositories(args: Record<string, unknown>) { if (!cfg.githubToken) throw new Error("GITHUB_TOKEN is not configured"); const query = String(args.query || ""); const language = args.language ? String(args.language) : undefined; if (!query) throw new Error("query is required"); return client.searchRepositories(query, language); },
- src/apis/github/github.ts:43-50 (schema)Input schema for the tool, specifying 'query' as required string and optional 'language' string.inputSchema: { type: "object", properties: { query: { type: "string" }, language: { type: "string" }, }, required: ["query"], },
- src/apis/github/github.ts:40-51 (registration)Tool registration entry in the GitHub module's registerGitHub() function, including name, description, and schema.{ name: "search_repositories", description: "Search GitHub repositories", inputSchema: { type: "object", properties: { query: { type: "string" }, language: { type: "string" }, }, required: ["query"], }, },
- src/apis/github/github.ts:13-16 (helper)GitHubClient helper method that builds the search query string and performs the API request to GitHub's /search/repositories endpoint.searchRepositories(query: string, language?: string) { const q = language ? `${query} language:${language}` : query; return this.request("/search/repositories", { query: { q } }); }
- src/tools/register.ts:26-26 (registration)Invocation of registerGitHub() in the central tools registration function registerAllTools(), which collects tools and handlers from all API modules.registerGitHub(),