Skip to main content
Glama
PhialsBasement

GitHub MCP Server Plus

list_commits

Retrieve commit history from a GitHub repository branch to track changes, review code evolution, and analyze development progress.

Instructions

Get list of commits of a branch in a GitHub repository

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ownerYes
repoYes
shaNo
pageNo
perPageNo

Implementation Reference

  • The main handler function that executes the tool logic by making a GitHub API request to list commits in a repository.
    export async function listCommits(
      owner: string,
      repo: string,
      page?: number,
      perPage?: number,
      sha?: string
    ) {
      return githubRequest(
        buildUrl(`https://api.github.com/repos/${owner}/${repo}/commits`, {
          page: page?.toString(),
          per_page: perPage?.toString(),
          sha
        })
      );
    }
  • Zod input schema defining parameters for the list_commits tool: owner, repo, optional sha, page, perPage.
    export const ListCommitsSchema = z.object({
      owner: z.string(),
      repo: z.string(),
      sha: z.string().optional(),
      page: z.number().optional(),
      perPage: z.number().optional()
    });
  • index.ts:119-122 (registration)
    Tool registration in the ListTools response, specifying name, description, and input schema.
      name: "list_commits",
      description: "Get list of commits of a branch in a GitHub repository",
      inputSchema: zodToJsonSchema(commits.ListCommitsSchema)
    },
  • index.ts:335-347 (registration)
    Dispatch logic in the CallToolRequest handler that parses arguments and invokes the listCommits function.
    case "list_commits": {
      const args = commits.ListCommitsSchema.parse(request.params.arguments);
      const results = await commits.listCommits(
        args.owner,
        args.repo,
        args.page,
        args.perPage,
        args.sha
      );
      return {
        content: [{ type: "text", text: JSON.stringify(results, null, 2) }],
      };
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure but offers minimal information. It implies a read-only operation ('Get list'), but doesn't specify whether authentication is required, if there are rate limits, how pagination works (given the 'page' and 'perPage' parameters), or what the output format looks like. This is inadequate for a tool with multiple parameters and no structured annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence with zero wasted words. It's front-loaded with the core purpose ('Get list of commits'), making it easy to scan and understand quickly. Every word earns its place, achieving optimal conciseness.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (5 parameters, 0% schema coverage, no annotations, no output schema), the description is incomplete. It doesn't explain parameter meanings, behavioral traits like pagination or authentication, or what the output contains. For a tool that likely returns structured commit data, this leaves significant gaps for an AI agent to use it effectively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 0%, meaning none of the 5 parameters are documented in the schema. The description only vaguely references 'branch' (implied by 'sha' parameter) and 'GitHub repository' (implied by 'owner' and 'repo'), but doesn't explain what 'sha', 'page', or 'perPage' mean or how they affect the output. It adds minimal value beyond the bare schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Get list of commits') and the resource ('of a branch in a GitHub repository'), making the purpose immediately understandable. However, it doesn't explicitly differentiate this tool from potential sibling tools like 'search_code' or 'get_file_contents' that might also involve repository data, which prevents a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., authentication needs), compare it to siblings like 'search_code' for finding specific commits, or indicate scenarios where it's preferred over other tools. This leaves the agent with minimal context for selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/PhialsBasement/mcp-github-server-plus'

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