Skip to main content
Glama

git_diff

Read-onlyIdempotent

Display repository changes, optionally limited to staged files or a specific path, so you can 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.2.1

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so safety is covered structurally. The description adds only the meaning of the staged option; it says nothing about output truncation, binary files, or large-diff behaviour, which is exactly the kind of extra context that would earn a higher score here.

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 short sentence, front-loaded with the verb and resource, with no filler. It is arguably too terse rather than padded, so conciseness is a strength even though the content is thin.

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?

An output schema exists, so return format need not be described. For a read-only 3-parameter tool the description is minimally adequate, but it omits the repo parameter's role and any note on diff size or pathspec syntax, leaving gaps an agent could trip over when invoking it.

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%: the properties carry only titles ("Path", "Repo", "Staged") and defaults. The description does clarify that path limits the diff to one path and that staged selects the index, which goes slightly beyond the bare titles, but it never explains the repo parameter or that repo defaults to the current directory.

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?

The description gives a specific verb ("Show") and resource ("git diff") with the scope qualifiers "staged" and "for one path", so an agent can tell this apart from a whole-worktree diff. It stops short of naming the neighbouring diff tools (git_diff_stat, git_diff_summary, git_show), so differentiation is inferred rather than stated.

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?

"optionally staged and/or for one path" implies when to reach for it (working-tree comparison, staging-area comparison, single-file inspection), but the tool must be selected against git_diff_stat, git_diff_summary, git_show and git_status, and none are mentioned. No explicit when-not guidance.

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