Skip to main content
Glama

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
NameRequiredDescriptionDefault
ownerYes
repoYes

Implementation Reference

  • 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); },
  • 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"], }, },
  • 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(), ];
  • 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}`); }

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