MCP ToolsParameters
set_canvas_size
Change the canvas dimensions of a sketch using a preset name or explicit width/height.
Input Schema
| Parameter | Type | Required | Description |
|---|---|---|---|
sketchId | string | yes | ID of the sketch to update |
preset | string | no | Canvas preset name (e.g. "square-1200", "hd-1920x1080") |
width | number | no | Explicit width in pixels |
height | number | no | Explicit height in pixels |
Either preset or both width and height must be provided.
Output Shape
{
"success": true,
"sketchId": "noise-grid",
"canvas": { "width": 1920, "height": 1080 },
"previousCanvas": { "width": 1200, "height": 1200 }
}Side Effects
- Updates sketch canvas dimensions in memory
- Saves sketch to disk
- Sends
sketch:updatedsidecar notification
Error Cases
| Condition | Error |
|---|---|
| No workspace open | "No workspace is currently open" |
| Unknown sketch ID | "Sketch not found: 'bad-id'" |
| Unknown preset | "Unknown canvas preset: 'bad-preset'" |
| No dimensions | "Provide either a preset or both width and height" |
Golden Path Example
Request:
{ "sketchId": "noise-grid", "preset": "hd-1920x1080" }Response:
{
"success": true,
"sketchId": "noise-grid",
"canvas": { "width": 1920, "height": 1080 },
"previousCanvas": { "width": 1200, "height": 1200 }
}