genart.dev
MCP ToolsSketch Lifecycle

delete_sketch

Delete a sketch file from disk and remove it from the active workspace.

Input Schema

ParameterTypeRequiredDescription
sketchIdstringyesID of the sketch to delete
keepFilebooleannoIf 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 .genart file from disk (unless keepFile is 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

ConditionError
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
}