Skip to main content
Glama

lgh_diff

Read-onlyIdempotent

Show uncommitted changes in a Git working directory as JSON, including per-file statistics and full diff, truncated at 32KB to protect the caller's context.

Instructions

Show uncommitted changes in a Git working directory: runs git diff --stat for a per-file summary plus the full unified diff, and returns JSON with has_changes, stat, diff, truncated, and staged. The full diff is truncated at 32KB to protect the caller's context. Refuses with an error when the path is not inside a git work tree. Use this to review patch content before lgh_save or lgh_up; use lgh_up_dryrun instead when you only need the changed-file list, trash detection, and LGH registration state.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNoAbsolute path to the LOCAL working directory (defaults to current directory)
stagedNoShow only staged (cached) changes (default: false)

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already declare readOnly, non-destructive, and idempotent behavior. The description adds critical behavioral details: truncation at 32KB to protect context and refusal outside a Git work tree. These are not inferable from annotations alone.

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 sentences, no redundant phrasing, and the content is logically ordered: what it does, what it returns, key constraints, and when to use alternatives. Every sentence carries meaningful 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?

Although no output schema is provided, the description lists all return fields (has_changes, stat, diff, truncated, staged) and covers the error condition (non-Git path). Combined with sibling-tool context, an agent has sufficient information to invoke correctly.

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?

The schema provides 100% coverage for both parameters (path with default and staged with default). The description adds no extra semantic information beyond what the schema already states, so the baseline score of 3 is appropriate.

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 ('Show'), resource ('uncommitted changes in a Git working directory'), and differentiates from the sibling lgh_up_dryrun by describing its distinct output (full diff vs. change list). This makes the tool's purpose immediately clear.

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 instructs when to use this tool ('to review patch content before lgh_save or lgh_up') and when to use an alternative ('use lgh_up_dryrun instead when you only need the changed-file list, trash detection, and LGH registration state'). No ambiguity remains.

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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/JoeGlenn1213/lgh'

If you have feedback or need assistance with the MCP directory API, please join our Discord server