MCP ToolsWorkspace Management
open_workspace
Open an existing `.genart-workspace` file and return all sketch metadata with canvas positions.
Input Schema
| Parameter | Type | Required | Description |
|---|---|---|---|
path | string | yes | File path to .genart-workspace file |
Output Shape
{
"success": true,
"path": "/absolute/path/to/workspace.genart-workspace",
"id": "typography-explorations",
"title": "Typography Explorations",
"viewport": { "x": 0, "y": 0, "zoom": 0.5 },
"sketchCount": 4,
"sketches": [
{
"file": "orchestrated-opposition.genart",
"position": { "x": 0, "y": 0 },
"label": "v1 - Grid Contrasts",
"id": "orchestrated-opposition",
"title": "Orchestrated Opposition",
"renderer": { "type": "p5", "version": "1.x" },
"canvas": { "width": 1200, "height": 1200 },
"locked": false,
"visible": true
}
],
"groups": [
{
"id": "typography-series",
"label": "Typography Series",
"sketchFiles": ["orchestrated-opposition.genart", "felt-satzspiegel.genart"],
"color": "#c4342d"
}
]
}Each entry in sketches includes metadata extracted from the referenced .genart file (id, title, renderer, canvas dimensions) alongside workspace-level fields (position, label, locked, visible).
Side Effects
- Sets this workspace as the active workspace in the editor
- Reads all referenced
.genartfiles to extract metadata - Does not modify any files on disk
Error Cases
| Condition | Error |
|---|---|
path doesn't end in .genart-workspace | "Path must end with .genart-workspace" |
| File doesn't exist | "Workspace not found: /path/to/ws.genart-workspace" |
| File fails to parse | "Invalid workspace file: /path/to/ws.genart-workspace — [parse error]" |
| Referenced sketch file missing | "Sketch file not found: orchestrated-opposition.genart (referenced in workspace)" |
| Referenced sketch fails to parse | "Invalid .genart file: bad.genart — [parse error] (referenced in workspace)" |
Golden Path Example
Request:
{
"path": "~/projects/genart/outputs/typography.genart-workspace"
}Response:
{
"success": true,
"path": "/Users/et/projects/genart/outputs/typography.genart-workspace",
"id": "typography-explorations",
"title": "Typography Explorations",
"viewport": { "x": 0, "y": 0, "zoom": 0.5 },
"sketchCount": 2,
"sketches": [
{
"file": "orchestrated-opposition.genart",
"position": { "x": 0, "y": 0 },
"id": "orchestrated-opposition",
"title": "Orchestrated Opposition",
"renderer": { "type": "p5", "version": "1.x" },
"canvas": { "width": 1200, "height": 1200 },
"locked": false,
"visible": true
},
{
"file": "cadenced-fields.genart",
"position": { "x": 1400, "y": 0 },
"id": "cadenced-fields",
"title": "Cadenced Fields",
"renderer": { "type": "p5", "version": "1.x" },
"canvas": { "width": 1200, "height": 1200 },
"locked": false,
"visible": true
}
],
"groups": []
}