genart.dev
MCP ToolsSketch Lifecycle

save_sketch

Persist the current in-memory state of a sketch to its `.genart` file on disk.

Input Schema

ParameterTypeRequiredDescription
sketchIdstringyesID of the sketch to save

Output Shape

{
  "success": true,
  "sketchId": "noise-grid",
  "path": "/absolute/path/to/noise-grid.genart"
}

Side Effects

  • Writes the sketch definition to disk at the sketch's file path
  • Updates the modified timestamp

Error Cases

ConditionError
Sketch not found"Sketch not found: 'bad-id'"

Golden Path Example

Request:

{
  "sketchId": "noise-grid"
}

Response:

{
  "success": true,
  "sketchId": "noise-grid",
  "path": "/Users/et/projects/genart/outputs/noise-grid.genart"
}