Skip to main content
Glama

read_diff

Read-only

Review the commits and diff between two commits in the session's git repository, running git without hooks, filters or helpers and sending nothing. Use instead of git log, diff or show.

Instructions

Show the commits and the diff between two commits of the git repository in this session's folder, for a review. It runs git with no configured programs (hooks, filters, diff helpers, signature checks) and sends nothing. Use it instead of git log, diff or show in a shell.

Input Schema

NameRequiredDescriptionDefault
baseYesThe commit the change starts from: a commit id or a branch or tag name, such as main, 1a2b3c4 or HEAD~1
headYesThe last commit of the change, in the same form
statNoOnly the changed files and line counts, not the full diff

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.4.3

TDQS

A4.2/5.0
Behavior4/5

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

Goes well beyond readOnlyHint=true by disclosing that git runs with no configured programs (hooks, filters, diff helpers, signature checks) and that nothing is sent — real value for a security-conscious agent, since it rules out hook execution and network access. It stops short of warning about output size or truncation on large diffs.

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 sentences, zero filler, with the resource and scope front-loaded and the shell-alternative guidance trailing. Every clause carries information an agent needs.

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?

Complete enough: it names the inputs (two commits), the output (commits plus diff), and the safety posture; there is no output schema, but the return shape is described inline. Only gap is no mention of how large diffs are handled or whether stat mode is preferred for big changes.

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%, with base, head, and stat each documented in the schema including accepted forms (commit id, branch, tag, HEAD~1). The description adds nothing parameter-specific beyond noting there are two commits, so the baseline 3 applies.

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

Purpose5/5

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

States a specific verb and resource — 'Show the commits and the diff between two commits' — with explicit scope ('of the git repository in this session's folder') and intent ('for a review'). No sibling tool touches git, so it is trivially distinguishable from the messaging/peer tools.

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?

Explicitly routes the agent away from shell alternatives: 'Use it instead of git log, diff or show in a shell.' That is clear when-to-use guidance, though it offers no when-not conditions (e.g. uncommitted working-tree changes or cross-repo diffs are not addressed).

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