genart.dev
MCP ToolsWorkspace Management

remove_sketch_from_workspace

Remove a sketch from the active workspace, optionally deleting the `.genart` file from disk.

Input Schema

ParameterTypeRequiredDescription
sketchIdstringyesID of the sketch to remove
deleteFilebooleannoAlso delete the .genart file from disk (default: false)

Output Shape

{
  "success": true,
  "removedId": "noise-grid",
  "removedFile": "noise-grid.genart",
  "fileDeleted": false,
  "sketchCount": 2
}

Side Effects

  • Modifies the .genart-workspace file (removes sketch reference and group memberships)
  • Removes the sketch from the editor state cache and selection
  • If deleteFile is true: deletes the .genart file from disk

Error Cases

ConditionError
No workspace open"No workspace is currently open"
Sketch not found in cache"Sketch not found: 'bad-id'"
Sketch not in workspace"Sketch 'bad-id' is not in the workspace"

Golden Path Example

Request:

{
  "sketchId": "noise-grid",
  "deleteFile": false
}

Response:

{
  "success": true,
  "removedId": "noise-grid",
  "removedFile": "noise-grid.genart",
  "fileDeleted": false,
  "sketchCount": 2
}