Skip to main content
Glama

get_diff

Reads the frozen git diff for a file or all files, providing old and new line numbers. Use the new-side numbers to pinpoint findings and diagram nodes accurately.

Instructions

Read the frozen diff of one file, or of every file when path is omitted, with the old and the new line number of each line. Use the NEW-side numbers (second column) for every finding location and diagram node line.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNoChanged file to show (default: all files).
analysis_idYesId of the analysis, as returned by create_analysis or list_analyses.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.13

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 it does disclose meaningful traits the schema cannot: the diff is 'frozen' (an immutable snapshot rather than live state) and it carries old and new line numbers per line. It omits error behavior for an invalid analysis_id and any size/truncation limits, which keeps it from a 5.

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 dense sentences, front-loaded with the resource and scope, with zero filler. Every clause adds information an agent needs.

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?

There is no output schema and no annotations, so the description must describe the return shape, which it does (old and new line numbers per line). It leaves gaps around failure modes and behavior on very large diffs, but is otherwise complete for a read-only inspection tool.

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%, so baseline would be 3; the description still earns extra credit by explaining the two-column line-number output and which column to use for downstream locations. The path default it mentions is largely redundant with the schema.

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 ('Read') and resource ('the frozen diff'), plus the exact scope: one file, or all files when path is omitted. An agent immediately knows what this returns and how scope is controlled, 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?

Gives clear conditional guidance ('or of every file when path is omitted') and, unusually, cross-tool guidance that the NEW-side column must be used for finding locations and diagram node lines. It does not name alternatives or exclusions (e.g. when to prefer get_analysis), so it stops short of 5.

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