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
| 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 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
| 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_f7e2d1"
}Response
{
"layerId": "layer_c9d0e1",
"name": "Background Circle Copy",
"type": "shape",
"index": 1,
"sourceLayerId": "layer_f7e2d1"
}