Skip to main content
Glama

diff

Compare a git revision to the working tree at symbol level, listing added, removed, moved, and body-changed symbols. Enables structured PR review instead of parsing line hunks.

Instructions

Symbol-level diff between a git revision and the working tree: lists added / removed / moved / body-changed symbols on the touched files. Prefer over git diff + manual scanning for PR review — git diff returns line hunks while this returns structured symbol records, so an agent can iterate over changed-functions directly instead of parsing unified-diff text.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
baseYesGit revision to compare against (e.g. main, HEAD~3, origin/main). Working tree is the new side.
limitNoMax changes to return
excludeNoBlacklist changes by path glob; wins over include (repeatable)
includeNoWhitelist changes by path glob, gitignore syntax (repeatable)
project_rootNoAbsolute path to the project root (defaults to the MCP working directory)
exclude_testsNoDrop test files from the results (tests/ dirs, *_test.*, test_*.py, *.spec.ts, __tests__/, tests.rs, ...; same set as tests_for). Composes with include/exclude. Path-based only: Rust unit tests inside a `#[cfg(test)] mod tests` block of a non-test file are not excluded.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.27.3

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses the output shape (structured symbol records, iterable directly) and the change taxonomy, which goes beyond the schema. It does not discuss ordering, whether results are paged/truncated relative to `limit`, or read-only guarantees, which are minor omissions for a diff tool.

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, both front-loaded: the first defines the operation and its output, the second routes the agent away from `git diff`. No filler or restated boilerplate.

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?

No output schema exists, so the description correctly steps in to describe the return value as symbol records grouped by change type. It is sufficient to call the tool correctly; only minor gaps remain (ordering, how `limit` truncation is signaled).

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% and every parameter (base, limit, exclude/include precedence, project_root, exclude_tests) is fully documented in the schema itself. The description adds no parameter-level detail beyond the schema, so the baseline 3 applies.

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 ('symbol-level diff between a git revision and the working tree') plus the exact output categories (added/removed/moved/body-changed symbols). It distinguishes itself from the closest non-MCP alternative, `git diff`, and from line-hunk tools generally.

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 names the alternative ('git diff' + manual scanning) and the scenario that selects this tool ('PR review'), and explains why: structured symbol records vs. unified-diff text. Nothing is left to inference about when to reach for it.

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