Skip to main content
Glama

workspace.diff

Read-only

Return the project's git diff against HEAD as plain text, including staged and unstaged changes; use scope=stat for a per-file summary before requesting the full patch.

Instructions

Return the project's git diff against HEAD as plain text, staged and unstaged changes together; untracked files are not included. Read-only. scope=stat returns only the per-file summary; anything else returns the full patch, which can be large, so start with stat. For the list of changed files use workspace.status; for session-level changes use session.diff.

Input Schema

NameRequiredDescriptionDefault
scopeNostat for a per-file summary, full (default) for the whole patch

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.1.9
    • changedInput schema / properties / scope / description
      Previous value: -"stat|full"New value: +"stat for a per-file summary, full (default) for the whole patch"
  2. First observedv0.1.8

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, and the description reinforces safety with 'Read-only' while adding non-obvious behavior: untracked files are omitted and the full patch can be large. That output-size warning is genuinely additive, though it stops short of stating pagination or truncation behavior.

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?

Three dense sentences with the resource, constraints, and alternatives front-loaded in that order. No filler; each clause carries either behavior or routing information.

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

Completeness5/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 correctly takes on the return-format burden, specifying plain text and the distinction between the stat summary and the full patch. For a single-optional-parameter read tool it leaves nothing an agent needs unanswered.

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% and the schema already documents both stat and full, so baseline is 3. The description improves on it by clarifying the default mode and stating the catch-all rule ('anything else returns the full patch'), which resolves ambiguity the enum-free string type leaves open.

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 ('Return the project's git diff against HEAD') plus precise scope: staged and unstaged combined, untracked excluded. The scope parameter's two modes are named inline, so the agent understands the tool fully without opening the schema.

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?

Explicitly routes to alternatives: workspace.status for the list of changed files and session.diff for session-level changes. It also gives a usage strategy ('start with stat') because the full patch can be large, which is guidance an agent can act on directly.

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