MCP ToolsDesign Layers
design_lock_layer
Lock or unlock a design layer.
Lock or unlock a design layer. Locked layers cannot be edited, moved, or removed until they are unlocked. If locked is omitted, the current state is toggled.
Input Schema
| Parameter | Type | Required | Description |
|---|---|---|---|
sketchId | string | No | Target sketch ID. Defaults to the currently active sketch. |
layerId | string | Yes | The ID of the layer to lock or unlock. |
locked | boolean | No | Set to true to lock, false to unlock. Omit to toggle. |
Output Shape
{
"layerId": "layer_b6d7f8",
"name": "Grain",
"locked": true
}Side Effects
- The layer's lock state changes in the UI (lock icon appears or disappears).
- Locked layers reject edit, move, and remove operations.
Error Cases
| Error | Cause |
|---|---|
SKETCH_NOT_FOUND | The specified sketchId does not exist or no sketch is active. |
LAYER_NOT_FOUND | No layer with the given layerId exists in the sketch. |
Golden Path Example
Request
{
"layerId": "layer_b6d7f8",
"locked": true
}Response
{
"layerId": "layer_b6d7f8",
"name": "Grain",
"locked": true
}