Skip to main content
Glama

Git log

git_log
Read-only

Retrieve structured Git commit history with hash, author, date, and message; filter by ref range, author, path, date, or exclusion pattern for parseable results.

Instructions

Structured git log: commit hash, author, date, message. Compact and parseable. Use range for ref comparisons (e.g. 'main..feature'). Use exclude to filter out commits matching a pattern (e.g. 'ci:').

Input Schema

NameRequiredDescriptionDefault
cwdNoRepository path
pathNoFilter by file path
countNoNumber of commits (default 20)
rangeNoGit ref range (e.g. 'main..feature', 'HEAD~5..HEAD')
sinceNoSince date (e.g. '2024-01-01')
authorNoFilter by author
excludeNoExclude commits matching this grep pattern (uses --invert-grep)
withFilesNoInclude list of files changed per commit

Output Schema

NameRequiredDescriptionDefault
countYes
commitsYes
retainedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv5.0.1

TDQS

A3.6/5.0
Behavior3/5

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

readOnlyHint=true already tells the agent this is a safe read, and the output schema exists, so the description doesn't need to enumerate return values. It adds some value by noting output is 'compact and parseable' and by disclosing that exclude uses --invert-grep semantics, but says nothing about default result limits (count defaults to 20), ordering, or what happens with large histories.

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?

Four short sentences, front-loaded with the output contract before the parameter hints. Every sentence carries distinct information with no repetition of the tool name or padding.

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?

With eight optional parameters, full schema coverage, an output schema, and a readOnly annotation, the description covers the non-obvious surface adequately. It stops short of explaining how the filters combine or what the default 20-commit cap means for callers expecting a full history.

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 all eight parameters including the range and exclude examples. The description restates the range ('main..feature') and exclude ('ci:') examples rather than adding new semantics such as precedence between since/range/author or how path filtering interacts with range.

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?

States a concrete resource and return shape ('Structured git log: commit hash, author, date, message. Compact and parseable'), so an agent knows exactly what it gets back. It does not differentiate itself from adjacent siblings like git_diff or git_status, which falls 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 Guidelines3/5

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

The guidance ('Use range for ref comparisons', 'Use exclude to filter out commits matching a pattern') is really per-parameter usage instruction rather than when-to-use-this-tool-vs-alternatives guidance. There is no statement about when to reach for git_log instead of git_diff, git_status or rg, so the choice among siblings is left implicit.

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