genart.dev
MCP ToolsDesign Layers

design_toggle_visibility

Show or hide a design layer.

Show or hide a design layer. Hidden layers are excluded from the design composite rendering. If visible 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 show or hide.
visiblebooleanNoSet to true to show, false to hide. Omit to toggle.

Output Shape

{
  "layerId": "layer_b6d7f8",
  "name": "Grain",
  "visible": false
}

Side Effects

  • The layer's visibility changes in the UI (eye icon updates).
  • Hidden layers are excluded from the design composite.
  • The composite re-renders to reflect the change.

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"
}

Response

{
  "layerId": "layer_b6d7f8",
  "name": "Grain",
  "visible": false
}