data_diff
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
| Name | Required | Description | Default |
|---|---|---|---|
| file_path1 | Yes | Path to first file (base) | |
| file_path2 | Yes | Path to second file (comparison) | |
| ignore_order | No | Ignore list/array ordering in comparison |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | No | ||
| file1 | No | ||
| file2 | No | ||
| success | Yes | ||
| summary | No | ||
| statistics | No | ||
| differences | No | ||
| file1_format | No | ||
| file2_format | No | ||
| has_differences | No |