Skip to main content
Glama

git_diff

Read-onlyIdempotent

Inspect working-tree or staged changes, or compare two revisions to see what changed before committing or merging.

Instructions

Inspect working-tree/staged changes or compare two revisions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
baseNo
headNo
pathYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.2

TDQS

B3.1/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 safety is covered structurally. The description adds that both working-tree/staged state and arbitrary revision pairs can be inspected, but says nothing about untracked files, patch format, or rename detection.

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?

A single tight sentence with zero waste, front-loading the primary capability. It is arguably too terse for a 3-parameter tool, but it is structurally efficient.

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

Completeness2/5

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

An output schema exists so return values need not be explained, and annotations cover the safety profile. However, with three undocumented parameters (0% coverage) and a required path with no stated meaning, an agent cannot reliably construct a correct call from this definition.

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

Parameters2/5

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

Schema description coverage is 0% and the description never mentions base, head, or path. 'Compare two revisions' loosely gestures at base/head but gives no format or semantics (refs? SHAs?), and the required path parameter is entirely unexplained.

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 (inspect/compare) and resource (working-tree/staged changes, revisions), making it distinguishable from siblings like git_log and git_show. It does not name any sibling explicitly, but the two operating modes are clear.

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 two modes (working-tree/staged inspection vs. revision comparison) imply usage, but there is no guidance on when to pick this over git_show or git_log, nor any prerequisites. Usage is inferable rather than stated.

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