Skip to main content
Glama

git_diff

Show current Git changes in a workspace repository, including staged or working-tree diffs, and limit results to a single file when needed.

Instructions

Get the current diff for a repository inside the workspace.

Args: path: Path to the git repository, relative to the workspace root. staged: If True, show staged (index) changes instead of the working-tree diff. file_path: Optional single file to limit the diff to.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNo.
stagedNo
file_pathNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior2/5

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

With no annotations provided, the description carries the full behavioral burden, yet it does not state that this is a read-only operation, whether it touches the working tree, authentication requirements, or the return format. It adds essentially nothing beyond what the name implies.

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?

Front-loaded one-line purpose followed by a tight Args block; every sentence earns its place with no redundancy.

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?

For a three-parameter read tool with no annotations and no output schema, the description covers the intent and each parameter adequately. It could say more about the returned diff format, but an agent has enough to invoke it correctly.

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 description coverage is 0%, so the description must compensate, and it does: it defines path (relative to workspace root), staged (index vs working-tree diff), and file_path (limit to one file). This meaningfully fills the gap, though it omits the default values 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 states a specific verb and resource: 'Get the current diff for a repository inside the workspace.' It is clearly distinguishable from unrelated file tools, and implicitly from git_status/git_log by the word 'diff,' though it names no sibling explicitly.

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?

Usage is only implied. The staged parameter note ('staged (index) changes instead of the working-tree diff') conveys a meaningful use-mode distinction, but the description never says when to prefer git_diff over git_status or git_log, nor any prerequisites.

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