MCP ToolsSketch Lifecycle
update_sketch
Update metadata, parameters, colors, or canvas dimensions of an existing sketch without changing its algorithm.
Input Schema
| Parameter | Type | Required | Description |
|---|---|---|---|
sketchId | string | yes | ID of the sketch to update |
title | string | no | New title |
philosophy | string | no | New philosophy text (markdown) |
canvas | { preset?: string, width?: number, height?: number } | no | New canvas dimensions |
parameters | ParamDef[] | no | Replace parameter definitions |
colors | ColorDef[] | no | Replace color definitions |
themes | ThemeDef[] | no | Replace theme presets |
seed | number | no | New random seed |
skills | string[] | no | Replace design skill references |
Output Shape
{
"success": true,
"sketchId": "noise-grid",
"updated": ["title", "parameters", "canvas"],
"canvas": { "width": 1200, "height": 1200 },
"parameterCount": 3,
"colorCount": 2,
"seed": 42
}Side Effects
- Overwrites the specified fields in the
.genartfile on disk - Updates the
modifiedtimestamp - Rebuilds
state.paramsif parameters change, using new defaults - Rebuilds
state.colorPaletteif colors change, using new defaults - Does not change the
algorithmfield (useupdate_algorithmfor that)
Error Cases
| Condition | Error |
|---|---|
| Sketch not found | "Sketch not found: 'bad-id'" |
| No workspace open | "No workspace is currently open" |
| No fields to update | "No fields to update. Provide at least one of: title, philosophy, canvas, parameters, colors, themes, seed, skills" |
| Unknown canvas preset | "Unknown canvas preset: 'giant'. Use list of valid presets." |
| Parameter default out of range | "Parameter 'margin' default (999) outside range [10, 100]" |
| Duplicate parameter keys | "Duplicate parameter key: 'margin'" |
Golden Path Example
Request:
{
"sketchId": "noise-grid",
"title": "Noise Grid v2",
"parameters": [
{ "key": "cells", "label": "Cells", "min": 4, "max": 64, "step": 1, "default": 16 },
{ "key": "scale", "label": "Scale", "min": 0.01, "max": 1.0, "step": 0.01, "default": 0.15 }
],
"canvas": { "preset": "square-2400" }
}Response:
{
"success": true,
"sketchId": "noise-grid",
"updated": ["title", "parameters", "canvas"],
"canvas": { "width": 2400, "height": 2400 },
"parameterCount": 2,
"colorCount": 1,
"seed": 42
}