Aplicar JSON Patch (RFC 6902)
json-patch-applyAplica un JSON Patch (RFC 6902) de forma atómica; si una operación falla, no se aplica nada. Cuándo: hay que transformar, comparar o revisar con exactitud datos estructurados (JSON, CSV, YAML, XML, arreglos). No para: calcular un JSON Patch (json-diff-patch). Efectos secundarios: ninguno (solo lectura, sin red, sin estado guardado). Determinista: la misma entrada da la misma salida. Límites: entrada JSON de hasta 64 KB, 1 s por llamada, resultado de hasta 1 MB.
EN: Applies an RFC 6902 JSON Patch (add, remove, replace, move, copy, test) atomically to a document; any failing operation aborts the whole patch. When: structured data (JSON, CSV, YAML, XML, arrays) has to be transformed, compared or checked exactly. Not for: computing an RFC 6902 JSON Patch that transforms document a into document b (json-diff-patch). Side effects: none (read-only, no network access, no stored state). Deterministic: the same input gives the same output. Limits: JSON input up to 64 KB, 1 s per call, result up to 1 MB.
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": {
"value": "<value>",
"patch": "<patch>"
},
"name": "json-patch-apply"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| patch | Yes | Patch operations (max 1,000; result max 200,000 nodes) (array of object; required; up to 1000 items). | |
| value | Yes | Target document (any JSON value; required). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| value | No | any JSON value |