Skip to main content
Glama
narayana-reddy-circles

MCP Git Status Server

git-log

View recent commit history from a Git repository to track changes and review project development. Specify directory and number of commits to display.

Instructions

Get recent git commit history

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
directoryNoDirectory path to check git log (defaults to current directory)
countNoNumber of recent commits to show (default: 10)

Implementation Reference

  • Handler for the git-log tool: executes git log command with optional directory and count parameters, returns formatted commit history or error.
    if (name === "git-log") {
      const { directory, count = 10 }: { directory?: string; count?: number } = args || {};
      
      try {
        const cwd = directory || process.cwd();
        
        const gitLog = execSync(`git log --oneline -n ${count}`, {
          cwd: cwd,
          encoding: "utf-8",
          stdio: ["pipe", "pipe", "pipe"]
        });
    
        return {
          content: [{
            type: "text",
            text: `Recent Git Commits (${count} most recent):\n\n${gitLog}`
          }]
        };
        
      } catch (error) {
        const errorMessage = error instanceof Error ? error.message : String(error);
        
        return {
          content: [{
            type: "text",
            text: `Error running git log: ${errorMessage}`
          }],
          isError: true
        };
      }
    }
  • src/index.ts:43-60 (registration)
    Registration of the git-log tool in the ListToolsRequestHandler response, including name, description, and input schema.
    {
      name: "git-log",
      description: "Get recent git commit history",
      inputSchema: {
        type: "object",
        properties: {
          directory: {
            type: "string",
            description: "Directory path to check git log (defaults to current directory)"
          },
          count: {
            type: "number",
            description: "Number of recent commits to show (default: 10)",
            default: 10
          }
        }
      }
    }
  • Input schema definition for the git-log tool, specifying directory and count parameters.
    inputSchema: {
      type: "object",
      properties: {
        directory: {
          type: "string",
          description: "Directory path to check git log (defaults to current directory)"
        },
        count: {
          type: "number",
          description: "Number of recent commits to show (default: 10)",
          default: 10
        }
      }
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. 'Get recent git commit history' implies a read-only operation, but it doesn't specify output format, error conditions, or any behavioral traits like rate limits or side effects. For a tool with no annotation coverage, this is a significant gap in transparency.

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, efficient sentence that directly states the tool's purpose without any wasted words. It's appropriately sized and front-loaded, making it easy for an agent to parse quickly.

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

Completeness3/5

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

Given the tool's moderate complexity (a read operation with two parameters) and no output schema, the description is minimally complete. It states what the tool does but lacks details on output format or behavioral context. With no annotations and 100% schema coverage, it's adequate but has clear gaps in usage guidance and transparency.

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

Parameters3/5

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

The description adds no parameter semantics beyond what the input schema provides. However, schema description coverage is 100%, with clear documentation for both parameters ('directory' and 'count'), including defaults. This meets the baseline score of 3, as the schema adequately handles parameter documentation.

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 'Get recent git commit history' clearly states the tool's function with a specific verb ('Get') and resource ('git commit history'), making the purpose immediately understandable. However, it doesn't explicitly differentiate from the sibling tool 'git-status' (which likely shows working directory status rather than commit history), so it doesn't reach the highest 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 the sibling tool 'git-status' or any other context for choosing between them, nor does it specify prerequisites or constraints. This leaves the agent with minimal usage context.

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/narayana-reddy-circles/mcp-git-status'

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