Skip to main content
Glama

Local Commander

Git diff

git_diff
Read-onlyIdempotent

Use this when the user wants to see the uncommitted or staged changes of an approved project. Read-only. Needs the sessionId from execution_session_open and a new operationId; each call is metered as one execution. A short result is returned inline within about two seconds; otherwise keep the returned IDs for operation_status and operation_output and do not resend the call.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileNoLimit the diff to this file (optional)
pathNoPath relative to the selected project root (or the workspace root without a project target); omit for the root.
stagedNoShow staged changes instead of unstaged ones (default false)
sessionIdYesexecutionSessionId returned by execution_session_open
deadlineAtNoOptional UTC admission deadline at most 60 seconds ahead (queue start timeout, NOT process execution lifetime)
operationIdYesA new random UUID v4 for this call; reuse it only to retry this same call
idempotencyKeyNoOptional retry key, 8-128 chars of [A-Za-z0-9._:-]; defaults to operationId
efficiencyProfileNoOptional, unverified label of the client's model, recorded as display metadata in the device owner's local activity statistics. Omit when unknown. Never send credentials or conversation content.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already cover read-only/idempotent/non-destructive, and the description adds genuinely new traits: each call is metered as one execution, short results return inline within ~2 seconds, and longer results must be fetched via the returned IDs rather than by resending the call. That cost, latency and retry guidance goes well beyond what the annotations declare.

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 tight sentences with zero filler; the trigger is front-loaded, then the safety/cost facts, then the return-handling rule. Every sentence carries operational 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?

For an 8-parameter tool with no output schema, the description covers the two things an agent cannot infer: the metering cost and the inline-vs-async result contract with the exact follow-up tools. Remaining fields (deadlineAt, efficiencyProfile, path/file) are fully documented in the schema, so nothing material is missing.

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 every parameter including sessionId, operationId, deadlineAt, staged, path, file and efficiencyProfile is already documented in the schema. The description's remarks about sessionId provenance and a fresh operationId largely restate the schema, so it adds little beyond the baseline.

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 gives a specific verb and resource — seeing the uncommitted or staged changes — and scopes it to an approved project, which cleanly separates it from git_status (working-tree status) and git_log (history) among the siblings. An agent can pick this tool 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 Guidelines4/5

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

It states a clear trigger condition ('when the user wants to see the uncommitted or staged changes') and names the follow-up path (operation_status/operation_output) when the result is not inline. It does not, however, state when NOT to use it or name a sibling alternative (e.g., git_status vs git_diff) explicitly, so it falls short of full when/when-not/alternatives coverage.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources