Skip to main content
Glama

git_diff

Displays Git changes between the working tree, index, or commits, with optional staged-only and path filtering to inspect modifications before committing.

Instructions

Show git diff (optionally staged and/or for one path).

Input Schema

NameRequiredDescriptionDefault
pathNo
repoNo.
stagedNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.2/5.0
Behavior3/5

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

No annotations are provided, so the description carries the burden. "Show" implies a read-only operation, and the output schema covers the return shape, but the description does not state permissions, whether untracked files appear, or any other behavioral trait.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

One short sentence, front-loaded with the core action and no wasted words. It is appropriately sized for a simple git tool.

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?

For a simple read-only tool with an output schema, the essentials are covered, but the missing explanation of the 'repo' parameter and the absence of any comparative guidance against git_diff_stat leave it only minimally complete.

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 0%, so the description should compensate. It does explain 'staged' and 'path' at a high level, but the 'repo' parameter and its default '.' are completely unaddressed, leaving a meaningful gap.

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 specific verb and resource ('Show git diff') plus the two optional scoping modes (staged/path). It is clear what the tool does, though it does not explicitly distinguish itself from the nearby git_diff_stat sibling.

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?

Only implies usage by listing the optional flags. It never says when to prefer this over git_diff_stat, git_show, or git_status, nor does it give preconditions or exclusions.

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