Skip to main content
Glama

git_diff

Returns diffs of modified or staged changes, optionally scoped to a file or repository directory, so you can review what changed before committing or integrating.

Instructions

Returns git diff of modified files or staged changes

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdNoOptional repository working directory
fileNoSpecific file path to diff
stagedNoWhether to inspect staged changes (--cached)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full behavioral burden. It implies a read-only operation but says nothing about the return format (unified diff text vs structured), how large diffs are handled, or behavior on a clean tree/empty diff. For a tool with zero annotation coverage this is a notable gap.

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 front-loaded sentence with no wasted words. It is appropriately sized, though it is short enough that the omitted usage and behavioral context is a content gap rather than a verbosity problem.

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 simple three-parameter read tool with fully documented schema and no output schema, so not much is required. However, with no annotations and no return-value description, an agent gets no signal about the diff output shape or edge-case behavior, leaving it minimally viable rather than complete.

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 100%, so the schema already documents cwd, file, and staged. The description's phrase 'modified files or staged changes' loosely maps to the file and staged parameters but adds no format or syntax detail beyond the schema, so the baseline 3 applies.

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 and resource ('Returns git diff of modified files or staged changes'), which is clear enough to distinguish it from git_status and git_commit. It stops short of naming any sibling or clarifying the overlap with git_status, so it falls 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 Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives no guidance on when to reach for this tool versus git_status, git_commit, or repo_read_file, nor any preconditions (e.g., repo must exist, working directory assumptions). Usage has to be inferred entirely from the name.

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