Skip to main content
Glama
git MCP server

git MCP server

Official

git_log

Read-onlyIdempotent

Retrieve a Git repository's commit history newest first, with an optional commit limit and date-range filters to inspect recent changes or a specific period.

Instructions

Shows the commit log, newest commit first. For the latest commits, pass only repo_path (and optionally max_count). start_timestamp and end_timestamp are optional filters for a date range: omit them unless a specific period is asked for, because a range that holds no commits returns none.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "repo_path": "<repo_path>"
    },
    "name": "git_log"
  }
}

Input Schema

NameRequiredDescriptionDefault
max_countNoMaximum number of commits to show. Must be at least 1.
repo_pathYes
end_timestampNoOptional: only show commits at or before this time. Omit for no upper bound. Accepts: ISO 8601 format (e.g., '2024-01-15T14:30:25'), relative dates (e.g., '2 weeks ago', 'yesterday'), or absolute dates (e.g., '2024-01-15', 'Jan 15 2024')
start_timestampNoOptional: only show commits at or after this time. Omit for no lower bound. Accepts: ISO 8601 format (e.g., '2024-01-15T14:30:25'), relative dates (e.g., '2 weeks ago', 'yesterday'), or absolute dates (e.g., '2024-01-15', 'Jan 15 2024')

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv2.6.0
    • changedInput schema / properties / end_timestamp / description
      Previous value: -"End timestamp for filtering commits. Accepts: ISO 8601 format (e.g., '2024-01-15T14:30:25'), relative dates (e.g., '2 weeks ago', 'yesterday'), or absolute dates (e.g., '2024-01-15', 'Jan 15 2024')"New value: +"Optional: only show commits at or before this time. Omit for no upper bound. Accepts: ISO 8601 format (e.g., '2024-01-15T14:30:25'), relative dates (e.g., '2 weeks ago', 'yesterday'), or absolute dates (e.g., '2024-01-15', 'Jan 15 2024')"
    • changedInput schema / properties / start_timestamp / description
      Previous value: -"Start timestamp for filtering commits. Accepts: ISO 8601 format (e.g., '2024-01-15T14:30:25'), relative dates (e.g., '2 weeks ago', 'yesterday'), or absolute dates (e.g., '2024-01-15', 'Jan 15 2024')"New value: +"Optional: only show commits at or after this time. Omit for no lower bound. Accepts: ISO 8601 format (e.g., '2024-01-15T14:30:25'), relative dates (e.g., '2 weeks ago', 'yesterday'), or absolute dates (e.g., '2024-01-15', 'Jan 15 2024')"
  2. Changed2 schema fields changedv2.4.0
    • addedInput schema / properties / max_count / description
      Added value: +"Maximum number of commits to show. Must be at least 1."
    • addedInput schema / properties / max_count / minimum
      Added value: +1
  3. Changed1 schema field changedv2.0.0
    • changedInput schema / title
      Previous value: -"GitLog"New value: +"logArguments"
  4. Addedv1.0.0

TDQS

A4.1/5.0
Behavior4/5

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

The annotations already declare this as a read-only, idempotent, non-destructive operation. The description adds useful behavioral context beyond the annotations: results are newest-first, and a date range with no matching commits returns none, which helps the agent avoid unnecessary empty results.

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 compact and front-loaded: the tool's purpose comes first, followed immediately by guidance on the common latest-commits case and the date-range caveat. Every sentence carries useful information without repetition.

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

Completeness4/5

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

For a simple read-only git log query, the definition is largely complete: annotations cover safety, the schema covers most parameters, and the description adds ordering and timestamp-filter guidance. It does not describe the shape of returned commit entries or clarify repo_path format, which are minor gaps given the tool's simplicity.

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

Parameters4/5

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

Schema description coverage is 75%, and the description adds practical meaning for the optional timestamp filters by explaining when to omit them and what happens with an empty range. The repo_path parameter remains undocumented in both the schema and the description, which keeps this from a 5.

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 states a specific verb and resource: it 'shows the commit log' and specifies newest-first ordering. It does not explicitly distinguish this from sibling tools such as git_show, which likely covers individual commit details, so it stops short of a 5.

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

Usage Guidelines4/5

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

It gives clear usage guidance for the common case: pass only repo_path and optionally max_count for latest commits. It also explicitly warns to omit start_timestamp and end_timestamp unless a specific period is requested, but it does not route the agent to any alternative sibling tool when git_log is not appropriate.

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