Patch an animation (fast edit)
apply_patchApply targeted find/replace edits to an animation's SVG for quick tweaks like color, size, or timing without resending the whole document.
Instructions
Apply small find/replace edits to an animation's SVG in place — the fast path for tweaks like color, size, position, timing, text, or easing. Prefer this over apply_edit: it avoids resending the whole document. Each find must match the current SVG exactly (verbatim substring). If a find isn't found, the patch is rejected wholesale (nothing changes) — fix the find or fall back to apply_edit. The preview refreshes live.
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": {
"requestId": "<requestId>",
"edits": "<edits>"
},
"name": "apply_patch"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| edits | Yes | Ordered find/replace operations applied to the current SVG. | |
| requestId | Yes | The id from the await_edit_request result. |