MCP ToolsWorkspace Management
add_sketch_to_workspace
Add an existing `.genart` sketch file to the active workspace at an optional canvas position.
Input Schema
| Parameter | Type | Required | Description |
|---|---|---|---|
sketchPath | string | yes | Path to the .genart file to add |
position | { x: number, y: number } | no | Canvas position (default: auto-placed to the right of existing sketches) |
label | string | no | Display label override for the workspace |
Output Shape
{
"success": true,
"file": "noise-grid.genart",
"id": "noise-grid",
"title": "Noise Grid",
"position": { "x": 1400, "y": 0 },
"sketchCount": 3
}Side Effects
- Modifies the
.genart-workspacefile on disk (adds sketch reference) - Loads the sketch into the editor state cache
- Does not modify the
.genartfile
Error Cases
| Condition | Error |
|---|---|
| No workspace open | "No workspace is currently open" |
| Sketch file doesn't exist | "Sketch file not found: /path/to/missing.genart" |
| Sketch already in workspace | "Sketch 'noise-grid.genart' is already in the workspace" |
| Invalid .genart file | "Invalid .genart file: /path/to/bad.genart — [parse error]" |
Golden Path Example
Request:
{
"sketchPath": "~/projects/genart/outputs/noise-grid.genart",
"position": { "x": 2800, "y": 0 },
"label": "v3 - Noise Grid"
}Response:
{
"success": true,
"file": "noise-grid.genart",
"id": "noise-grid",
"title": "Noise Grid",
"position": { "x": 2800, "y": 0 },
"sketchCount": 3
}