Skip to main content
Glama
N0moreher0
by N0moreher0

Diff files

project_diff_files
Read-only

Compare two workspace files to produce a git-style unified diff with lines added/removed and full hunk text, helping review edits before or after changes.

Instructions

Unified (git-style) diff between two workspace files. Reports lines_added/lines_removed and the full hunk text. Use when: comparing two versions of a file, or reviewing changes before/after an edit. Avoid when: the two files are in different languages or one is binary; large binaries are not supported. Speed: medium; LCS-based diff over the two full texts, bounded by max_lines. Output: diff_files: lines_added, lines_removed, unified_diff, truncated. Batch-safe: yes

Input Schema

NameRequiredDescriptionDefault
max_linesNo
context_linesNo
relative_path_aYesPath inside the workspace (relative, or absolute inside the workspace)
relative_path_bYesPath inside the workspace (relative, or absolute inside the workspace)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.5.4

TDQS

A4.7/5.0
Behavior5/5

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

Annotations only say readOnlyHint=true and openWorldHint=false, but the description adds real behavioral detail: LCS-based algorithm, medium speed, bounded by max_lines, truncation flag, binary unsupported, and batch-safe. These are performance and limitation traits the agent could not infer from structured fields.

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?

Front-loaded with the one-line purpose, then labeled sections (Use when / Avoid when / Speed / Output / Batch-safe) that are scannable and free of filler. Every line carries information an agent needs.

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 present, the description explicitly enumerates the return fields (lines_added, lines_removed, unified_diff, truncated), so the agent knows the shape of the result. Combined with limits and performance notes, nothing essential is missing for a two-path read-only tool.

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 coverage is 50%: both relative_path_a/b are documented in-schema, but max_lines and context_lines have no descriptions. The description only mentions max_lines as a bound ('bounded by max_lines') and never explains context_lines, which is the meaningful hunk-size knob. Partial compensation for the coverage gap, so a baseline-plus score.

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 first sentence names a specific verb and resource: a unified git-style diff between two workspace files, plus what it returns. No sibling tool offers diffing, so an agent can immediately select it for comparison tasks over read_file or search.

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?

Explicit 'Use when' (comparing versions, before/after an edit) and 'Avoid when' (cross-language, binary, large binaries unsupported) clauses give both positive and negative routing. This is the strongest form of selection guidance available.

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