Skip to main content
Glama

data_diff

Read-onlyIdempotent

Compare two config files to identify structured differences. Returns a detailed diff with statistics and summary, supporting JSON, YAML, TOML, and cross-format comparisons.

Instructions

Compare two configuration files and return structured differences.

Performs a deep comparison of two configuration files (JSON, YAML, TOML) and returns a structured diff with statistics and a human-readable summary. Supports cross-format comparison (e.g. JSON vs YAML).

Output contract: Returns DiffResponse with has_differences, differences dict, statistics, and summary. Side effects: None (read-only). Failure modes: ToolError if files not found or formats disabled.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_path1YesPath to first file (base)
file_path2YesPath to second file (comparison)
ignore_orderNoIgnore list/array ordering in comparison

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileNo
file1No
file2No
successYes
summaryNo
statisticsNo
differencesNo
file1_formatNo
file2_formatNo
has_differencesNo
Behavior5/5

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

Annotations already provide readOnlyHint=true, idempotentHint=true, destructiveHint=false. The description adds valuable context: side effects (none), failure modes (ToolError for missing files or disabled formats), and output contract (DiffResponse with has_differences, differences, statistics, summary). No contradictions.

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 concise with four sentences, each serving a purpose: purpose, details, output contract, side effects/failures. No redundant information.

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?

Given the presence of output schema and annotations, the description adequately covers purpose, supported formats, output structure, and failure modes. It could mention performance but is sufficient for typical use.

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 100% with all three parameters described. The description adds overall context (e.g., cross-format comparison) but does not enhance individual parameter meanings beyond the schema. Baseline score of 3 is appropriate.

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 verb 'compare' and the resource 'configuration files', and specifies the output 'structured differences'. It distinguishes from sibling tools like data_merge or data_convert by focusing on diffing.

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

Usage Guidelines4/5

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

The description indicates when to use the tool: for deep comparison of configuration files in JSON, YAML, TOML, including cross-format. It does not explicitly mention when not to use it or provide alternatives among siblings, but the context is clear.

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/bitflight-devops/mcp-json-yaml-toml'

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