list_commits
Retrieve recent commits for a GitHub repository by specifying the owner and repo details. Part of the Multi-MCPs server, which integrates multiple APIs for streamlined access to various web services.
Instructions
List recent commits for a repository
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| owner | Yes | ||
| repo | Yes |
Implementation Reference
- src/apis/github/github.ts:115-121 (handler)Handler function for the 'list_commits' tool. Validates inputs (owner, repo) and token configuration, then calls the GitHubClient's listCommits method.async list_commits(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.listCommits(owner, repo); },
- src/apis/github/github.ts:81-88 (schema)Input schema definition for the 'list_commits' tool, specifying owner and repo as required string properties.inputSchema: { type: "object", properties: { owner: { type: "string" }, repo: { type: "string" }, }, required: ["owner", "repo"], },
- src/apis/github/github.ts:78-89 (registration)Registration of the 'list_commits' tool within the GitHub tools array returned by registerGitHub().{ name: "list_commits", description: "List recent commits for a repository", inputSchema: { type: "object", properties: { owner: { type: "string" }, repo: { type: "string" }, }, required: ["owner", "repo"], }, },
- src/apis/github/github.ts:29-31 (helper)Helper method in GitHubClient class that makes the API request to list commits for a given repository.listCommits(owner: string, repo: string) { return this.request(`/repos/${owner}/${repo}/commits`); }