genart.dev
MCP ToolsDesign Layers

design_update_layer

Update properties on a design layer.

Update the name or type-specific properties of a design layer. Only the fields you provide are changed; all other fields remain untouched.

Input Schema

ParameterTypeRequiredDescription
sketchIdstringNoTarget sketch ID. Defaults to the currently active sketch.
layerIdstringYesThe ID of the layer to update.
namestringNoNew display name for the layer.
propertiesobjectNoType-specific properties to merge into the layer. Existing properties not included here are preserved.

Output Shape

{
  "layerId": "layer_f7e2d1",
  "name": "Large Circle",
  "type": "shape",
  "updated": ["name", "properties"]
}

Side Effects

  • The layer is re-rendered with the new properties.
  • The design composite updates to reflect changes.

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.
INVALID_PROPERTIESA property value is invalid for this layer type.

Golden Path Example

Request

{
  "layerId": "layer_f7e2d1",
  "name": "Large Circle",
  "properties": {
    "fill": "#e53e3e",
    "strokeWidth": 2
  }
}

Response

{
  "layerId": "layer_f7e2d1",
  "name": "Large Circle",
  "type": "shape",
  "updated": ["name", "properties"]
}