genart.dev
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

ParameterTypeRequiredDescription
sketchIdstringNoTarget sketch ID. Defaults to the currently active sketch.
layerIdstringYesThe ID of the layer to lock or unlock.
lockedbooleanNoSet 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

ErrorCause
SKETCH_NOT_FOUNDThe specified sketchId does not exist or no sketch is active.
LAYER_NOT_FOUNDNo 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
}