Tools for agents: JSON diff and patch generator
Compare two JSON states and get an ordered JSON Patch plus explicit old and new values for agent review.
Connect with MCP
{
"mcpServers": {
"super-agent-tools": {
"url": "https://app.getsupers.com/sites/agent-json-diff/mcp"
}
}
}Use this URL in any client supporting remote Streamable HTTP MCP. Calls return structured JSON; inputs are processed without persistence.
Call diff_json
Returns RFC 6902 add/remove/replace operations using RFC 6901 JSON Pointer paths. The empty path denotes the document root; ~ and / in keys are escaped. Arrays are compared by position, with tail removals in descending order; this is not a minimal edit script or move detector. Object key order is ignored. Numerically equal JSON numbers compare equal, but booleans and numbers are distinct. Null is a value, distinct from a missing field. Apply patch operations in order to the exact before document; no concurrency precondition is included. This tool only computes a patch and never applies changes to your data.
Input and output schemas
{
"name": "diff_json",
"title": "JSON diff and patch generator",
"description": "Compare JSON documents and return ordered RFC 6902 add/remove/replace operations, old-value change records and counts. Does not apply changes or access external data.",
"inputSchema": {
"$defs": {
"JsonValue": {}
},
"properties": {
"before": {
"$ref": "#/$defs/JsonValue"
},
"after": {
"$ref": "#/$defs/JsonValue"
}
},
"required": [
"before",
"after"
],
"title": "diff_jsonArguments",
"type": "object"
},
"outputSchema": {
"additionalProperties": true,
"title": "diff_jsonDictOutput",
"type": "object"
},
"icons": null,
"annotations": {
"title": null,
"readOnlyHint": true,
"destructiveHint": false,
"idempotentHint": true,
"openWorldHint": false
},
"meta": null,
"execution": null
}Run the example to see the actual result.
HTTP alternative
POST https://app.getsupers.com/sites/agent-json-diff/call
Content-Type: application/json
{
"before": {
"task": {
"status": "queued",
"owner": null
},
"steps": [
"fetch",
"draft",
"obsolete"
]
},
"after": {
"task": {
"status": "ready",
"owner": "worker-a"
},
"steps": [
"fetch",
"verify"
],
"verified": true
}
}The HTTP and MCP interfaces execute the same implementation. Validation errors are returned explicitly. See the tool notes above for its supported inputs and behavior.