Skip to main content
Glama

diff_files

Compare two files and display their differences in unified, context, or ndiff format. Optionally set context lines for clearer output.

Instructions

Compare two files and show differences.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file1YesPath to first file
file2YesPath to second file
context_linesNoNumber of context lines (default: 3)
formatNoOutput format - "unified", "context", or "ndiff" (default: "unified")unified

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior2/5

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

With no annotations provided, the description bears full responsibility for behavioral disclosure. It merely states the action without addressing read-only nature, file size limits, error handling, or output format details. The description fails to convey behavioral traits beyond the basic function.

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

Conciseness3/5

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

The description is concise and front-loaded, but it is overly brief. It could include a bit more detail (e.g., supported formats) without losing conciseness. It is adequate but not exemplary.

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

Completeness2/5

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

Given the tool has four parameters, an output schema, and no annotations, the description is too sparse. It omits important context such as the ability to customize output format and context lines, which are specified in the schema but not mentioned in the description. The description feels incomplete for a file comparison 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?

The input schema already provides descriptions for all four parameters, covering 100% of them. The description adds no additional meaning beyond what the schema offers, so it meets the baseline but does not exceed it.

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 description clearly states the tool's purpose with a specific verb ('compare') and resource ('two files'), and the output ('differences'). It effectively distinguishes itself from the sibling tool 'diff_text' by specifying files rather than text strings.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives like 'diff_text' or other file manipulation tools. There is no mention of prerequisites, context, or exclusions.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/quyansiyuanwang/oh-my-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server