Skip to main content
Glama

Diff

git_diff
Read-onlyIdempotent

Show differences between two revisions or the working tree and HEAD, with optional path filtering and a stat-only mode for a quick change overview.

Instructions

Diff between two revisions (or the working tree against HEAD when base is omitted). Use stat_only for a quick overview.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "git_diff"
  }
}

Input Schema

NameRequiredDescriptionDefault
baseNo
headNo
pathNo
repoNoPath to the repository (or a folder inside it). Defaults to the first allowed root.
max_charsNo
stat_onlyNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

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 and openWorldHint=false, so the safety profile is covered. The description usefully adds the no-base default (working tree vs HEAD), but says nothing about truncation via max_chars or what the diff output looks like, which matters for a diff tool.

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?

Two short sentences with the core behavior front-loaded and no filler. Slightly terse for a 6-parameter tool, but nothing is wasted.

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?

A read-only diff tool with no output schema needs little, and the safety side is covered by annotations. However, truncation behavior (max_chars) and the meaning of head/path are missing, leaving an agent unsure how much output it will get.

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 coverage is only 17% (just repo), so the description must compensate. It clarifies base semantics and stat_only, but leaves head, path and especially max_chars (default 30000, max 200000) unexplained, so half the parameters carry no meaning anywhere.

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 verb and resource ('diff between two revisions') plus the important default behavior when base is omitted. It does not explicitly differentiate from siblings like git_show, which can also surface diffs, so it stops 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?

'Use stat_only for a quick overview' gives parameter-level guidance rather than tool-selection guidance. The default working-tree behavior is implied by the parenthetical, but there are no when-not conditions or named alternatives among git_show/git_log.

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

Deploy Server

Other Tools