Skip to main content
Glama

git_diff

Identify code changes by retrieving the git diff, with an option to include staged changes. Specify a working directory to inspect modifications in your repository.

Instructions

Get git diff (optionally staged)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdNo
stagedNo
Behavior2/5

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

No annotations are present, so the description bears the full transparency burden. It indicates the default unstaged behavior via 'optionally staged' but does not disclose whether it modifies state, requires a repository, or what error conditions exist.

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?

The entire description is a single sentence, front-loaded and free of filler. It earns its place but leaves many details unaddressed.

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?

Given no output schema and no annotations, the description should explain return values, scope (working tree vs index vs HEAD), and error conditions. None are covered, making the tool under-specified for reliable use.

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

Parameters2/5

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

The description clarifies the 'staged' boolean parameter but says nothing about 'cwd'. With 0% schema property descriptions, the parameter semantics are largely unspecified, leaving the agent to guess at cwd's meaning.

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 'Get' and resource 'git diff', clearly identifying the operation. The qualifier 'optionally staged' adds a distinct mode, but it does not explicitly differentiate from sibling git tools like git_status.

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?

No guidance is provided on when to use this tool versus alternatives such as git_status or git_commit_prepare. The description only states what it does, not when to invoke it.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/PushPullCommitPush/GPT-Commander---An-LLM-facing-software-engineering-substrate'

If you have feedback or need assistance with the MCP directory API, please join our Discord server