Skip to main content
Glama

Diff files

diff_files
Read-onlyIdempotent

Use this when the user wants to see how two text files differ, before or after a change.

Input Schema

NameRequiredDescriptionDefault
leftYesAbsolute path of the original file.
rightYesAbsolute path of the file to compare against it.
deviceYesReMCP device id returned by list_devices. Required for every device operation.
context_linesNoLines of context around each change. Default 3, maximum 20.

Output Schema

NameRequiredDescriptionDefault
dataNoOptional structured result data for follow-up reasoning and tool calls.
textYesConcise human-readable result of the tool call.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added
  2. Removed
  3. First observed

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already disclose readOnlyHint=true, idempotentHint=true, and destructiveHint=false, so the safety profile is covered by structured data. The description adds modest context beyond this — that the tool operates on text files and is suited for pre/post-change review — but it does not disclose behaviors like error conditions for missing files, output format expectations, or device-side requirements beyond what the schema already covers.

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?

The description is a single front-loaded sentence that gets straight to the core purpose (see how two files differ) and the timing context. Every word earns its place with no filler, repetition, or irrelevant detail.

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?

This is a low-complexity tool with strong supporting context: a 100%-covered input schema, an output schema, and rich annotations. The description sufficiently covers when and why to use the tool; the only minor gap is that it doesn't mention that the files live on a remote device or hint at the diff presentation style, though these are largely covered by schema and output schema.

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%, with every parameter (left, right, device, context_lines) already documented with clear semantic descriptions, so the baseline is 3 per the rubric. The description adds zero parameter-level meaning beyond the schema — it does not, for example, clarify the left-vs-right ordering convention or the role of context_lines.

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 states a specific activity — comparing two text files to see how they differ — which is clear and actionable. It does not explicitly distinguish itself from siblings, but none of the many sibling tools (apply_patch, replace_lines, read_file) are diff tools, so the purpose is inherently differentiated.

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?

The phrase 'before or after a change' gives useful temporal context for when to invoke the tool, and 'text files' implies a scope limitation (not binary files). However, there is no explicit when-not-to-use guidance, no mention of alternatives, and no statement about when a different tool (e.g., read_file) would be more appropriate.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources