Skip to main content
Glama
git-commit-message-mcp

git-commit-message-mcp

by halfmoonvic

git_diff

Retrieves Git diffs of code changes between the working directory, HEAD, or specified branches, providing the exact changes needed to generate accurate commit messages.

Instructions

Get git diff showing code changes.

Usage:

  • No params: working directory changes vs HEAD

  • compare="branch": HEAD vs branch

  • base="dev", compare="feature": feature vs dev (shows changes in feature relative to dev)

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
baseNoBase branch or commit (default: HEAD)
compareNoBranch or commit to compare (default: working directory)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.6/5.0
Behavior4/5

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

With no annotations, the description must carry the full behavioral burden, and it does disclose the key non-obvious trait: the direction of the diff when both base and compare are set ('shows changes in feature relative to dev'). It omits output characteristics (unified diff text, truncation on large diffs, whether untracked files appear), which leaves a real gap given zero annotation coverage.

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?

One headline sentence followed by a three-bullet usage block; every line conveys a distinct parameter mode and nothing is repeated. Front-loaded and cheap to scan.

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 two-optional-parameter, no-output-schema tool, the description covers defaults, combination behavior, and the zero-argument case, which is most of what an agent needs. It stops short of describing the returned diff format or size limits, the one piece an agent cannot infer from structured fields.

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 coverage is 100%, so the baseline is 3; the description earns an extra point by explaining the combined semantics of the two parameters (which side is the base vs the compared ref) and the meaning of the empty-parameter case. That is meaning beyond the schema's per-field 'default:' notes.

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?

States a specific verb and resource ('Get git diff showing code changes') and immediately enumerates the three scope modes, so an agent knows exactly what the tool returns in each configuration. The sibling tools (prompt generators) are unrelated, so no sibling differentiation is needed here.

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?

The 'Usage:' block explicitly maps each parameter combination to a diff semantic: no params for working-directory changes, compare-only for HEAD vs branch, base+compare for feature vs dev. This is exactly the when-to-use routing an agent needs for a parameterized tool; the only thing absent is a when-not-to-use case, which is hard to construct for a read-only diff.

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