MCP ToolsParameters
set_seed
Set the random seed of a sketch, optionally generating a random value.
Input Schema
| Parameter | Type | Required | Description |
|---|---|---|---|
sketchId | string | yes | ID of the sketch to update |
seed | number | no | Explicit 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:updatedsidecar notification
Error Cases
| Condition | Error |
|---|---|
| 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
}