genart.dev
MCP ToolsParameters

set_parameters

Update the runtime parameter values of a sketch's current state.

Input Schema

ParameterTypeRequiredDescription
sketchIdstringyesID of the sketch to update
paramsRecord<string, number>yesParameter key-value pairs to set

Output Shape

{
  "success": true,
  "sketchId": "noise-grid",
  "updated": ["cells", "scale"],
  "state": {
    "seed": 42,
    "params": { "cells": 24, "scale": 0.5 },
    "colorPalette": ["#1a1a1a"]
  }
}

Side Effects

  • Updates sketch state 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"
Value outside range"Parameter 'cells' value 999 outside range [4, 32]"

Golden Path Example

Request:

{ "sketchId": "noise-grid", "params": { "cells": 24 } }

Response:

{
  "success": true,
  "sketchId": "noise-grid",
  "updated": ["cells"],
  "state": {
    "seed": 42,
    "params": { "cells": 24 },
    "colorPalette": ["#1a1a1a"]
  }
}