Skip to main content
Glama

project_diff

Inspect Git status and unified diffs of a project's working tree against HEAD, a specified commit, or staged changes to review code modifications.

Instructions

Git status and unified diff of the working tree (vs HEAD, vs 'commit', or staged only).

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": "project_diff"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathNoLocal project directory. Defaults to the server's working directory.
commitNoRevision to compare the working tree against.
formatNoOutput format: 'markdown' (default) or 'json' (structured envelope).markdown
stagedNoShow staged changes only.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior3/5

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

No annotations are supplied, so the description must carry the behavioral burden. 'Git status and diff' implies a non-mutating inspection, and the description discloses the default comparison base (HEAD) and the three modes, but says nothing about permissions, output size or truncation risk for large diffs, or whether the working tree is ever touched.

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?

A single sentence with the resource and the differentiating scopes front-loaded and zero filler wording.

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?

An output schema exists so return values need no explanation, and the four parameters are fully documented in the schema. The main gap is behavioral: with no annotations, the description should confirm the operation is read-only and note any output-size caveats.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description genuinely adds the default comparison target (HEAD) that the schema's 'commit' property does not state. It does not discuss the 'format' parameter's markdown/json choice, leaving that entirely to the schema.

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 ('Git status and unified diff of the working tree') and enumerates the three comparison scopes in parentheses. Sibling tools are read/search/project_* oriented, so an agent can distinguish this inspection tool immediately.

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?

The parenthetical '(vs HEAD, vs commit, or staged only)' maps each usage scenario to a mode, giving clear context for selecting it. It stops short of explicit exclusions or naming an alternative tool for related tasks (e.g., reading full file contents).

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