Skip to main content
Glama

compare_files

Compare two files to identify differences with customizable formatting options for code review and version tracking.

Instructions

Compare two files and show differences with multiple format options

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file1YesFirst file path
file2YesSecond file path
formatNoDiff format
contextLinesNoNumber of context lines (default: 3)
ignoreWhitespaceNoIgnore whitespace changes
wordDiffNoShow word-level differences
label1NoLabel for first file
label2NoLabel for second file
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions 'show differences with multiple format options,' which hints at output behavior, but doesn't describe what the comparison returns (e.g., structured diff, summary), error conditions, performance implications, or side effects. For a tool with 8 parameters and no output schema, this is inadequate.

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, efficient sentence that front-loads the core purpose. It wastes no words and directly communicates the tool's function, making it easy for an agent to parse quickly.

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's complexity (8 parameters, no annotations, no output schema), the description is insufficient. It doesn't explain the output format, error handling, or how parameters like 'contextLines' and 'wordDiff' affect the comparison. Without annotations or output schema, the agent lacks critical context for proper invocation and interpretation.

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%, so the schema fully documents all 8 parameters. The description adds minimal value beyond the schema by mentioning 'multiple format options,' which aligns with the 'format' enum parameter. However, it doesn't provide additional context like parameter interactions or default behaviors beyond what's in the schema descriptions.

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 clearly states the tool's purpose: 'Compare two files and show differences with multiple format options.' It specifies the verb ('compare'), resource ('two files'), and key capability ('show differences with multiple format options'). However, it doesn't explicitly differentiate from sibling tools like 'analyze_file_differences' or 'enhanced_git_diff', which prevents a perfect score.

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. It doesn't mention sibling tools like 'analyze_file_differences' or 'git_diff', nor does it specify prerequisites, use cases, or exclusions. This leaves the agent without context for tool selection.

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/block/vscode-mcp'

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