MCP ToolsSketch Lifecycle
delete_sketch
Delete a sketch file from disk and remove it from the active workspace.
Input Schema
| Parameter | Type | Required | Description |
|---|---|---|---|
sketchId | string | yes | ID of the sketch to delete |
keepFile | boolean | no | If true, remove from workspace but keep the .genart file on disk (default: false) |
Output Shape
{
"success": true,
"deletedId": "noise-grid",
"path": "/absolute/path/to/noise-grid.genart",
"fileDeleted": true,
"sketchCount": 2
}Side Effects
- Removes the sketch from the active workspace
- Deletes the
.genartfile from disk (unlesskeepFileis true) - Removes the sketch from the editor state cache
- Removes the sketch from the current selection if selected
- Saves the workspace to disk
- Does not remove the sketch from any groups (groups are cleaned up by removing empty ones)
Error Cases
| Condition | Error |
|---|---|
| Sketch not found | "Sketch not found: 'bad-id'" |
| No workspace open | "No workspace is currently open" |
Golden Path Example
Request:
{
"sketchId": "noise-grid"
}Response:
{
"success": true,
"deletedId": "noise-grid",
"path": "/Users/et/projects/genart/outputs/noise-grid.genart",
"fileDeleted": true,
"sketchCount": 3
}