Skip to main content
Glama

git_diff

Read-onlyIdempotent

Review staged and unstaged changes to tracked files before committing; read-only, reports clean when none exist, and excludes untracked files.

Instructions

Return git diff HEAD: all uncommitted changes (staged and unstaged) to tracked files, or '(clean)'. Read-only. Use after repo_write and before commit_push to review edits; brand-new untracked files are not shown.

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

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint=false, so safety is covered. The description adds real value beyond that by disclosing the exact '(clean)' sentinel output and the untracked-file omission, but it says nothing about size limits or truncation for large diffs.

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?

Two compact sentences, front-loaded with the exact output semantics before usage guidance, and the caveat is folded into the final clause. No filler.

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

Completeness5/5

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

With no parameters and no output schema, the description carries the full burden and discharges it: it names the return value, the clean sentinel, the tracked/untracked boundary, and its place in the workflow. Nothing needed to invoke it correctly is missing.

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?

The tool takes zero parameters, so there is no parameter meaning to convey; the description correctly avoids inventing arguments. Baseline 4 applies for a no-parameter tool.

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 command verb and resource ("Return `git diff HEAD`") plus the exact scope: all uncommitted changes, staged and unstaged, tracked files only. It also names the boundary case (untracked files not shown), distinguishing it from a generic diff tool.

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?

Gives explicit sequencing guidance with sibling names: "Use after repo_write and before commit_push to review edits." That covers the primary when-to-use case clearly; the only gaps are the absence of an explicit when-not or a pointer to an alternative for inspecting untracked files.

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