Patch model
patch_modelApply an RFC 6902 JSON Patch document to a model and run the reactive pipeline. Unlike 'mutate' (a flat address→value map), a patch expresses array insert/remove/move and test/copy ops, e.g. [{"op":"add","path":"/order/items/-","value":{...}}, {"op":"remove","path":"/order/items/0"}]. 'path' fields use RFC 6901 JSON Pointer (slash-separated, '-' for array append), NOT the $.-rooted address form. Same result shape and ROLLBACK/schema error handling as 'mutate'.
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": {
"id": "<id>",
"patch": "<patch>"
},
"name": "patch_model"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The model id. | |
| patch | Yes | An RFC 6902 JSON Patch: an array of {op, path, value?, from?} operations applied in order. | |
| includeTraces | No | Include the full derivation/constraint trace in the result (default false). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| traces | No | Full derivation/constraint traces (only when includeTraces:true). | |
| success | No | True when the mutation committed. | |
| metaUpdated | No | Meta paths recomputed. | |
| mutatedPaths | No | Base paths written. | |
| derivedUpdated | No | Derived paths recomputed. | |
| dispatchedEffects | No | Ids of effects dispatched. | |
| flaggedConstraints | No | Ids of FLAG-policy constraints that fired. |