Skip to main content
Glama

diff

Read-only

Compare two texts or files to show line-by-line or inline word/character changes, with options to ignore whitespace and case.

Instructions

Diff two texts/files: unified line diff, or word/char inline [-old-]{+new+}; ignore whitespace/case.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "diff"
  }
}

Input Schema

NameRequiredDescriptionDefault
aNo
bNo
modeNo
a_pathNo
b_pathNo
contextNo
ignore_caseNo
ignore_whitespaceNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.2

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, so the safety profile is covered. The description adds real value beyond that by disclosing the return shape (unified line diff, or inline [-old-]{+new+} markup) — important since there is no output schema — plus the effect of the ignore flags. It omits error behavior for missing files and the meaning of the context setting.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single dense sentence with the resource and output forms front-loaded and no filler. The slash phrasing ("texts/files") and the terse marker notation are slightly cryptic but compact rather than padded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with 8 undocumented parameters and no output schema, the description covers the modes and output format but leaves the context parameter and the inline-vs-path parameter duality unexplained. Adequate to attempt a call, not complete enough to guarantee a correct one.

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?

With 0% schema description coverage, the description carries the full burden for 8 parameters. It conveys a/b as the two texts, a_path/b_path as file inputs, the three mode values, and the two ignore flags, but leaves the critical a-versus-a_path relationship ambiguous and never mentions the 'context' parameter.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb and resource ("Diff two texts/files") and enumerates the output forms (unified line diff vs. inline word/char markers), which clearly separates it from siblings like date_diff, image_compare, or env_compare. It stops short of naming any sibling explicitly, so it sits just below the top band.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

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

Usage is implied by the scope (two texts or files) and the available modes, but there is no explicit when-to-use/when-not guidance and no advice on choosing line vs. word vs. char mode or when to pass a/b versus a_path/b_path. The agent must infer the selection criteria.

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