MCP ToolsDesign Layers
design_remove_layer
Remove a design layer from the sketch.
Remove a design layer from the sketch. The layer is permanently deleted and cannot be undone through this tool.
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 remove. |
Output Shape
{
"layerId": "layer_f7e2d1",
"name": "Background Circle",
"removed": true,
"remainingCount": 2
}Side Effects
- The layer is removed from the design composite.
- Layers above the removed layer shift down by one in z-order.
- If the removed layer was selected, selection is cleared.
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. |
LAYER_LOCKED | The layer is locked. Unlock it first with design_lock_layer. |
Golden Path Example
Request
{
"layerId": "layer_f7e2d1"
}Response
{
"layerId": "layer_f7e2d1",
"name": "Background Circle",
"removed": true,
"remainingCount": 2
}