Skip to main content
Glama

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
NameRequiredDescriptionDefault
queryYes
languageNo

Implementation Reference

  • 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); },
  • 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"], },
  • 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"], }, },
  • 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 } }); }
  • Invocation of registerGitHub() in the central tools registration function registerAllTools(), which collects tools and handlers from all API modules.
    registerGitHub(),

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/TaylorChen/muti-mcps'

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