get_repository_info
Retrieve detailed GitHub repository information using owner and repository name. Integrated into Multi-MCPs, it streamlines access to repository data alongside other popular APIs in a unified interface.
Instructions
Get GitHub repository details
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| owner | Yes | ||
| repo | Yes |
Implementation Reference
- src/apis/github/github.ts:99-105 (handler)The handler function that implements the core logic for the get_repository_info tool. It checks for the GitHub token, validates inputs, and delegates to the GitHubClient's getRepository method.async get_repository_info(args: Record<string, unknown>) { if (!cfg.githubToken) throw new Error("GITHUB_TOKEN is not configured"); const owner = String(args.owner || ""); const repo = String(args.repo || ""); if (!owner || !repo) throw new Error("owner and repo are required"); return client.getRepository(owner, repo); },
- src/apis/github/github.ts:53-63 (schema)The tool definition including name, description, and input schema for validating owner and repo parameters.name: "get_repository_info", description: "Get GitHub repository details", inputSchema: { type: "object", properties: { owner: { type: "string" }, repo: { type: "string" }, }, required: ["owner", "repo"], }, },
- src/tools/register.ts:22-33 (registration)Main tool registration where registerGitHub() is called to include the get_repository_info tool in the MCP server.const registrations: ToolRegistration[] = [ registerOpenWeather(), registerGoogleMaps(), registerNewsApi(), registerGitHub(), registerNotion(), registerTrello(), registerSpotify(), registerTwilio(), registerUnsplash(), registerCoinGecko(), ];
- src/apis/github/github.ts:18-20 (helper)Supporting method in GitHubClient class that makes the API request to fetch repository details from GitHub.getRepository(owner: string, repo: string) { return this.request(`/repos/${owner}/${repo}`); }