genart.dev
MCP ToolsParameters

set_seed

Set the random seed of a sketch, optionally generating a random value.

Input Schema

ParameterTypeRequiredDescription
sketchIdstringyesID of the sketch to update
seednumbernoExplicit seed value (default: generate random 0–99999)

Output Shape

{
  "success": true,
  "sketchId": "noise-grid",
  "seed": 42,
  "previousSeed": 12345
}

Side Effects

  • Updates sketch state.seed in memory
  • Saves sketch to disk
  • Sends sketch:updated sidecar notification

Error Cases

ConditionError
No workspace open"No workspace is currently open"
Unknown sketch ID"Sketch not found: 'bad-id'"

Golden Path Example

Request:

{ "sketchId": "noise-grid", "seed": 42 }

Response:

{
  "success": true,
  "sketchId": "noise-grid",
  "seed": 42,
  "previousSeed": 12345
}