Skip to main content
Glama

Git diff

git_diff
Read-onlyIdempotent

Retrieve a unified diff of workspace changes, showing staged or unstaged modifications for specified paths with configurable context lines.

Instructions

Return unified git diff for workspace changes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNo
pathsNo
stagedNo
unstagedNo
max_bytesNo
context_linesNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYes
errorNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.2

TDQS

C2.7/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, so the safety profile is covered. The description adds 'unified' and 'workspace changes' as useful context, but it does not disclose defaults, truncation behavior via max_bytes, or how staged/unstaged changes are handled.

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?

The description is one concise sentence with no filler and front-loads the core action and output format. It is efficient, though the brevity is partly a product of omitting parameter and usage detail, so it is not a 5.

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

Completeness2/5

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

For a tool with six parameters and zero schema descriptions, this is too thin. It states the core behavior and annotations cover safety, but it omits how to restrict paths, choose staged vs unstaged diffs, control context lines, or handle large outputs. Better than a pure tautology, but not adequate for confident invocation.

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

Parameters1/5

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

Schema description coverage is 0%, and the description mentions none of the six parameters: path, paths, staged, unstaged, max_bytes, or context_lines. The description therefore adds no semantic meaning beyond the bare parameter names and defaults already present in the schema.

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 uses a specific verb ('Return') and clearly identifies the resource: a unified git diff scoped to workspace changes. The 'workspace changes' scope separates it broadly from commit-history siblings like git_show and git_log, though it does not explicitly name any alternative.

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 about when to use git_diff versus sibling tools such as git_status, git_show, or git_blame. It also does not mention exclusions, prerequisites, or typical workflows, so the agent must infer the usage context.

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