as_json_patch
Generate a verified RFC 6902 JSON Patch that transforms one document into another, preserving keyed list item identity with remove/add/move operations.
Instructions
Generate an RFC 6902 JSON Patch that transforms document a into document b.
The patch is verified before it is returned: it is applied to a and the result is re-diffed against b (using the same options), so a patch that does not reproduce b is never returned. Lists are patched with remove/add/move so keyed items keep their identity. With ignore or tolerance options the patched a equals b only up to those options. NaN/Infinity cannot be expressed in JSON and are rejected.
Args: a, b: file paths, or the documents themselves when inputs='text'. inputs: 'files' (default) or 'text'; text requires an explicit format. format, array_match, array_keys, ignore, abs_tol, rel_tol, strip_comments, encoding: as in diff_files.
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": {
"a": "<a>",
"b": "<b>"
},
"name": "as_json_patch"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| a | Yes | ||
| b | Yes | ||
| format | No | auto | |
| ignore | No | ||
| inputs | No | files | |
| abs_tol | No | ||
| rel_tol | No | ||
| encoding | No | auto | |
| array_keys | No | ||
| array_match | No | auto | |
| strip_comments | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||