MCP ToolsSpatial Arrangement
arrange_sketches
Move specific sketches to explicit positions on the canvas.
Input Schema
| Parameter | Type | Required | Description |
|---|---|---|---|
positions | { sketchId: string, x: number, y: number }[] | yes | Explicit position assignments |
Output Shape
{
"success": true,
"moved": 3,
"positions": [
{ "id": "sketch-a", "position": { "x": 0, "y": 0 } },
{ "id": "sketch-b", "position": { "x": 1400, "y": 0 } },
{ "id": "sketch-c", "position": { "x": 0, "y": 1400 } }
],
"viewport": { "x": 700, "y": 700, "zoom": 0.4 }
}Side Effects
- Updates sketch positions in the
.genart-workspacefile on disk - Does not modify any
.genartfiles
Error Cases
| Condition | Error |
|---|---|
| No workspace open | "No workspace is currently open" |
| Empty positions array | "At least one position is required" |
| Unknown sketch ID | "Sketch not found: 'bad-id'" |
Golden Path Example
Request:
{
"positions": [
{ "sketchId": "sketch-a", "x": 0, "y": 0 },
{ "sketchId": "sketch-b", "x": 1400, "y": 0 }
]
}Response:
{
"success": true,
"moved": 2,
"positions": [
{ "id": "sketch-a", "position": { "x": 0, "y": 0 } },
{ "id": "sketch-b", "position": { "x": 1400, "y": 0 } }
],
"viewport": { "x": 700, "y": 0, "zoom": 0.5 }
}