Skip to main content
Glama

git log

git_log
Read-onlyIdempotent

Lists Git commits in reverse chronological order, showing hash, date, author, and subject. Scope history to a file or directory and set a limit to inspect repository changes.

Instructions

List the newest commits (hash, date, author, subject), newest first. Read-only. Use path= to scope to a file or directory, limit= to cap the number of commits (max 100).

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": "<repo>"
    },
    "name": "git_log"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathNoFile or directory to scope the history to
repoYesAbsolute path to a git working tree, inside MCP_ALLOWED_ROOTS
limitNoNumber of commits to return

Output Schema

NameRequiredDescriptionDefault
pathYesPath the history was scoped to, null for the whole tree
commitsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.5.0

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, so "Read-only" is largely redundant with structured data. The description does add useful behavior beyond the annotations: the newest-first ordering and the shape of each returned entry, plus the hard cap of 100 commits. It says nothing about pagination or truncation behavior when the cap is hit.

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?

Two tight sentences with the core capability and ordering front-loaded, followed by scoping guidance. No filler or repetition beyond the one-word "Read-only" hedge.

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 listing tool with an output schema and full schema coverage, the description covers what is needed to call it correctly. Only minor gaps remain, such as the default of 20 commits and behavior when the limit is reached.

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?

Schema description coverage is 100%, so the schema already documents repo, path, and limit including the maximum of 100. The description restates the path and limit intent but adds no format or edge-case detail (e.g. what an empty path means, whether path accepts globs), so the baseline of 3 applies.

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?

"List the newest commits (hash, date, author, subject), newest first" names a specific verb, resource, return fields, and ordering, so an agent immediately knows what it gets. It does not explicitly contrast itself with siblings like git_diff or git_status, leaving that inference to the reader.

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

Usage Guidelines3/5

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

The second sentence gives per-parameter usage guidance (path= to scope, limit= to cap at 100) rather than when-to-use versus alternatives. There is no statement of when to pick this over git_diff or git_status, so usage is only implied by the read-only history-listing framing.

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