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
| 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 update. |
name | string | No | New display name for the layer. |
properties | object | No | Type-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
| 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. |
INVALID_PROPERTIES | A 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"]
}