genart.dev
MCP ToolsDesign Layers

design_duplicate_layer

Clone a design layer, inserted above the source.

Clone a design layer. The duplicate is inserted directly above the source layer in the z-order and receives a new unique ID. The name is suffixed with "Copy".

Input Schema

ParameterTypeRequiredDescription
sketchIdstringNoTarget sketch ID. Defaults to the currently active sketch.
layerIdstringYesThe ID of the layer to duplicate.

Output Shape

{
  "layerId": "layer_c9d0e1",
  "name": "Background Circle Copy",
  "type": "shape",
  "index": 1,
  "sourceLayerId": "layer_f7e2d1"
}

Side Effects

  • A new layer is created with the same properties, transform, opacity, and blend mode as the source.
  • All layers above the source shift up by one in z-order.
  • The duplicate is selected in the UI.

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

Response

{
  "layerId": "layer_c9d0e1",
  "name": "Background Circle Copy",
  "type": "shape",
  "index": 1,
  "sourceLayerId": "layer_f7e2d1"
}