Skip to main content
Glama
codedev-mcp

codedev-mcp

by Kranthithota

git_diff

Read-onlyIdempotent

Compare working tree, staged changes, or commits and branches to review code modifications; optionally limit to a file or show file stats.

Instructions

Show git diff. Compare working tree, staged changes, or between refs/commits.

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
refNoFirst git ref (commit/branch)
fileNoFile path to diff
ref2NoSecond ref for comparison
statNoShow file stats only
stagedNoShow staged changes

Output Schema

NameRequiredDescriptionDefault
dataNo
actionYes
entriesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.2.5

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and openWorldHint=false, so the agent knows this is a safe, repeatable local read. The description adds the comparison modes but says nothing about output size, whether binary files or large diffs are handled, or how defaults behave when no ref is supplied; with annotations carrying the safety profile, a 3 is appropriate.

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?

Two short sentences, front-loaded with the core action and followed by the mode enumeration. No filler, no restatement of the title, and every clause carries information the agent needs to pick a mode.

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?

An output schema exists, so return values need no explanation, and all five parameters are fully covered by the schema. The description adequately frames the tool's comparison modes; only a note on default behavior when no ref/staged flag is given would make it complete.

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 five parameters are already documented in the schema. The description maps cleanly onto them (working tree = no ref, staged = staged, between refs = ref/ref2) but adds no syntax, format, or default-behavior detail beyond what the schema already states. Baseline 3 applies.

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?

States a specific verb and resource ('Show git diff') and immediately enumerates the three comparison modes it covers: working tree, staged, and between refs/commits. That is enough to know what it does, but it does not distinguish itself from neighboring tools like git_show or git_log, which plausibly also surface commit content.

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 mode list implicitly tells the agent when to reach for this tool (comparing uncommitted work, staged work, or two refs), which is more than a bare name. However, there is no explicit routing guidance, no statement of when to prefer git_show or branch_compare instead, and no prerequisites.

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