Skip to main content
Glama
MCP Git Server

MCP Git Server

by mpfilbin

git_diff

Show changes between commits, branches, or the working tree; compare staged changes and use commit ranges like HEAD...origin/master to inspect differences.

Instructions

Show changes between commits, commit and working tree, etc. Supports commit ranges like HEAD...origin/master

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "git_diff"
  }
}

Input Schema

NameRequiredDescriptionDefault
filesNoSpecific files to show diff for (defaults to all files)
cachedNoShow diff of staged changes
repoPathNoPath to git repository (defaults to current directory)
toCommitNoEnding commit/branch for comparison (e.g., "origin/master", commit hash). Defaults to working tree if not specified
fromCommitNoStarting commit/branch for comparison (e.g., "HEAD", "main", commit hash)
useThreeDotRangeNoUse three-dot range (fromCommit...toCommit) to show changes on toCommit since it diverged from fromCommit

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.2/5.0
Behavior2/5

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

Annotations are empty, so the description carries the full behavioral burden. It implies a read-only operation via "Show" but never states the output format (expected to be unified diff text), whether binary or untracked files are handled, or what happens with no arguments at all — significant gaps for a tool with zero annotation coverage and no output schema.

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?

Two short sentences, front-loaded with the core purpose followed by the range capability. The trailing "etc." is slightly wasteful and vague, but there is no padding or redundancy.

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

Completeness3/5

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

With six fully documented optional parameters the schema does most of the work, and no output schema exists to explain returns. However, for a tool with no annotations the description should do more to cover output shape and relationship to git_show/git_status, leaving a meaningful completeness gap.

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?

Schema description coverage is 100%, so all six parameters (files, cached, repoPath, toCommit, fromCommit, useThreeDotRange) are already documented in the schema. The description only reinforces the range concept via the HEAD...origin/master example, adding little beyond the schema's own three-dot explanation.

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?

"Show changes between commits, commit and working tree" states a specific verb (Show) and resource (changes/diff) and enumerates the comparison modes the tool supports. It does not distinguish itself from siblings like git_show or git_status, which also surface change information, so an agent must infer the boundary.

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?

The mention of commit ranges like HEAD...origin/master implies usage context for range comparisons, but there is no explicit when-to-use or when-not-to-use guidance and no named alternative for inspecting a single commit's contents. Usage is implied rather than stated.

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