MCP ToolsParameters
randomize_parameters
Generate random values for all or specific parameters within their defined [min, max] ranges.
Input Schema
| Parameter | Type | Required | Description |
|---|---|---|---|
sketchId | string | yes | ID of the sketch to randomize |
paramKeys | string[] | no | Specific parameter keys to randomize (default: all parameters) |
newSeed | boolean | no | Also 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:updatedsidecar notification
Error Cases
| Condition | Error |
|---|---|
| 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"]
}
}