Skip to main content
Glama

git_diff

Read-only

Read git working-tree or staged diffs with server-capped output, letting AI check changes without manual copy-paste.

Instructions

Read a git working-tree or staged diff with output capped by the server.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileNo
pathYes
agentNoOptional existing runtime binding for monitor attribution; no extra handshake.
stagedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.9/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so safety is covered. The description adds one genuinely useful behavioral trait – output is capped by the server – but never says what the cap is or how truncation surfaces to the caller, and does not explain failure modes for non-repo paths.

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?

A single front-loaded sentence with no filler; the core action and the output-cap caveat both earn their place. It is lean to the point of being under-specified, but nothing is wasted.

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

Completeness2/5

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

Four parameters including a nested agent object, 25% schema coverage, and no output schema leave the description carrying too little. An agent cannot tell how `path` and `file` interact, whether `staged` and working-tree can be combined, or what a capped response looks like.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is only 25%, so the description must compensate and largely does not. It gestures at the staged/working-tree choice (mapping to `staged`) but says nothing about the required `path`, the `file` filter, or how the nested `agent` binding affects attribution.

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 ("Read a git working-tree or staged diff") and names the two modes of the diff, which implicitly separates it from git_status and git_log. It is clear what the tool does, though it never explicitly contrasts itself with those siblings.

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

Usage Guidelines2/5

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

There is no when-to-use guidance, no statement of when to prefer git_diff over git_status or git_log, and no prerequisites (e.g., needing a repo initialized at the path). The staged parameter hints at a use case but the agent must infer it.

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