design_patch
Apply design patches to modify the canvas: insert, replace, remove, update, move, or tokenize nodes. Locked nodes reject patches, so resolve conflicts instead of retrying.
Instructions
Apply design patches (insert / replace / remove / update / move / token). This is the only way to modify the canvas. Nodes locked by the user reject your operations; if a patch is rejected, explain the conflict instead of retrying blindly.
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": {
"ops": "<ops>"
},
"name": "design_patch"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ops | Yes | Patch ops, e.g. {"op":"insert","parentId":"root","node":{"id":"hero","type":"box","children":[]}}, {"op":"update","targetId":"t1","patch":{"text":"新标题"}}, {"op":"update","targetId":"t1","patch":{"style":{}},"unset":["x","y"]} (return to flow layout), {"op":"token","name":"color","key":"brand.primary","value":"#2f6fed"}, {"op":"token","name":"color","key":"obsolete","value":"","unset":true} (delete token) | |
| projectId | No |