update_layer
Modify a layer's name, visibility, lock state, opacity, blend mode, parent, or stack position without changing unspecified fields. Use it to move and restyle layers, including locked layers.
Instructions
Rename, show/hide, lock/unlock, restyle or move a layer; only the given fields change.
The layer is moved first (parent, then stack_index), then its properties are set. All of this works on locked layers too. Groups have no opacity or blend mode. Returns the layer's new path and stack index.
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": {
"path": "<path>",
"layer": "<layer>"
},
"name": "update_layer"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Sprite file. Relative paths resolve against the server root. | |
| layer | Yes | Layer name, or a 'group/child' path for nested layers | |
| locked | No | Lock or unlock the layer against pixel and cel edits | |
| parent | No | Group to move the layer into; empty string for the top level | |
| opacity | No | Layer opacity, 0..255 | |
| visible | No | Show or hide the layer | |
| new_name | No | New layer name | |
| blend_mode | No | Layer blend mode | |
| stack_index | No | Position inside the (new) parent, 1 = bottom |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||