Skip to main content
Glama
office233
by office233

git_diff

Read-onlyIdempotent

Generate a unified diff of uncommitted changes, staged files, or against a specific ref, optionally limited to one file.

Instructions

Full unified diff of the working tree (or staged changes, or against a ref), optionally for one file.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
refNo
fileNo
pathNoRepository directory (default: default workspace)
stagedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.0.1

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, destructiveHint=false, and openWorldHint=false, so the safety profile is covered. The description adds that the output is a full unified diff, but does not disclose output size, error behavior, or pagination details.

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?

A single sentence, front-loaded with the core purpose and parenthetically listing the supported modes. Every phrase carries information and no words are wasted.

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?

With no output schema, the description still communicates that the return value is a full unified diff, and annotations cover the read-only safety profile. The low schema coverage and lack of ref/file syntax details leave minor gaps, but the definition is nearly complete for a simple read-only git inspection tool.

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 only 25%, so the description must compensate for three undocumented parameters. It maps to 'staged changes' (staged), 'against a ref' (ref), and 'optionally for one file' (file), adding meaningful semantics, but does not explain ref syntax or how staged and ref interact.

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 states a specific verb and resource: 'Full unified diff of the working tree (or staged changes, or against a ref), optionally for one file.' It clearly distinguishes the tool from siblings like git_status and git_log by naming the exact output type and scope.

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 description indicates modes of use: working tree, staged changes, against a ref, optionally one file. However, it does not explicitly compare this tool to alternatives such as git_status or git_log, nor does it state when not to use it.

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

Deploy Server

Other Tools