Skip to main content
Glama
liliangshan

MCP Server Git

by liliangshan

git_diff

Compare working directory with last commit or staging area. View unstaged or staged changes, optionally filtering by specific files.

Instructions

Show changes between working directory and HEAD or staging area.

USAGE: Call this tool to see the differences between your working directory and the last commit, or between staging area and HEAD.

Examples: {} - Show all unstaged changes {"staged": true} - Show staged changes {"files": ["src/main.js"]} - Show changes for specific file(s)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
stagedNoShow staged changes instead of unstaged, default false
filesNoSpecific files to show diff for
Behavior3/5

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

No annotations are present, so the description carries the burden. It implies a read-only operation but does not explicitly state that no modifications occur. The tool's nature (diff) makes it obvious, but explicit transparency would be better.

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 concise with a clear structure: a one-line summary, a usage heading, and examples. No unnecessary information. The examples are helpful but could be considered slightly verbose.

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?

The description does not explain the return format or behavior (e.g., that it outputs a text diff). Since there is no output schema, this omission leaves the agent uncertain about what to expect.

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?

The input schema has 100% description coverage, so the description does not add significant new meaning beyond what is already in the schema. The examples show usage patterns but do not explain parameter semantics further.

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 it shows changes between working directory and HEAD or staging area, but the phrasing is ambiguous regarding the default comparison. The examples clarify the two modes (unstaged vs staged), but the initial description could be clearer.

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?

A usage section is provided, but it only says 'Call this tool to see the differences' without explicit guidance on when not to use it or how it compares to sibling tools like git_status or git_log.

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/liliangshan/mcp-server-git'

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