Compare JSON documents
compare_jsonUse this when you want to compare two JSON documents, find changed JSON paths, or distinguish type changes from value changes. Ignores object key order, preserves array order, and compares decimal numbers without float rounding. Limits: 20,000 characters per document, depth 64, 4,000 values, 500 differences. Does not compare source code, YAML, JSON5, or duplicate-key documents.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"before": "<before>",
"after": "<after>"
},
"name": "compare_json"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| after | Yes | Strict JSON after the change, e.g. {"count":2,"enabled":"true"}. | |
| before | Yes | Strict JSON before the change, e.g. {"count":1,"enabled":true}. Do not include passwords or secrets. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| equal | Yes | ||
| counts | Yes | ||
| preview | Yes | ||
| downloads | Yes | ||
| change_count | Yes | ||
| preview_note | Yes |