genart.dev
MCP ToolsParameters

randomize_parameters

Generate random values for all or specific parameters within their defined [min, max] ranges.

Input Schema

ParameterTypeRequiredDescription
sketchIdstringyesID of the sketch to randomize
paramKeysstring[]noSpecific parameter keys to randomize (default: all parameters)
newSeedbooleannoAlso randomize the seed (default: false)

Output Shape

{
  "success": true,
  "sketchId": "noise-grid",
  "randomized": ["cells", "scale"],
  "state": {
    "seed": 42,
    "params": { "cells": 18, "scale": 0.73 },
    "colorPalette": ["#1a1a1a"]
  }
}

Side Effects

  • Updates sketch state.params (and optionally 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'"
Unknown parameter key"Unknown parameter: 'foo'. Valid keys: cells, scale"
No parameters defined"Sketch has no parameters to randomize"

Golden Path Example

Request:

{ "sketchId": "noise-grid", "newSeed": true }

Response:

{
  "success": true,
  "sketchId": "noise-grid",
  "randomized": ["cells", "scale"],
  "state": {
    "seed": 87234,
    "params": { "cells": 18, "scale": 0.73 },
    "colorPalette": ["#1a1a1a"]
  }
}