Skip to main content
Glama
jesspig

git-mcp-server

by jesspig

git_diff

Read-onlyIdempotent

Show differences between the working tree, index, and commits to review changes before staging or committing, or to compare two commits.

Instructions

Show differences between the working tree, the index, and commits. Defaults to a diffstat summary; pass stat=False for the full diff. Use this to review what a change actually contains before staging or committing, to compare two commits with source and target, or to check what would be committed with staged=True. Best for: reviewing changes before staging or committing. Returns: 'Diff output:' followed by the diff, or 'No changes'; stat=True shows a summary only. Does NOT show file status or history — use git_status for the file list and git_log for commits; use git_show to see one commit's full patch.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
statNoShow a diffstat summary (default True); pass False for the full diff
sourceNoCommit or ref to diff from
stagedNoShow staged changes
targetNoCommit or ref to diff against
repo_pathNoPath to the git repository, defaults to '.' (the server working directory).
Behavior5/5

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

Annotations already declare readOnlyHint=true and idempotentHint=true, and the description adds valuable behavioral context beyond that: it defaults to a diffstat summary, returns specific strings ('Diff output:' and 'No changes'), and explains what stat=True does. It also clarifies the scope (working tree, index, commits). This enriches transparency without contradicting annotations.

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 description is well-organized: core purpose first, then usage guidance, return format, and exclusions at the end. Every sentence conveys new, relevant information without fluff. It is longer than typical but each clause earns its place, and the structure makes it easy to scan.

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

Completeness5/5

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

For a read-only diff tool with no output schema, the description fully prepares the agent: it explains the default summary behavior, the return format, how to use source/target/staged, and explicitly notes what the tool does NOT do and which siblings cover those gaps. This is complete for effective invocation and interpretation.

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 100%, so the schema already defines each parameter. The description adds meaning by explaining how parameters combine in practice: 'stat=False for the full diff', 'compare two commits with source and target', and 'staged=True' to see what would be committed. This goes beyond the schema's per-field descriptions and earns credit, though it does not introduce wholly new parameter details.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb+resource: 'Show differences between the working tree, the index, and commits.' It clearly distinguishes the tool from siblings by stating what it does NOT show (file status or history) and names which sibling tools to use instead (git_status, git_log, git_show). This fully clarifies purpose and differentiation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

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

Explicit when-to-use guidance is given: 'Use this to review what a change actually contains before staging or committing, to compare two commits with source and target, or to check what would be committed with staged=True.' It also provides when-not-to-use via 'Does NOT show...' and names exact alternatives (git_status, git_log, git_show), making this a model of usage guidelines.

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

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