genart.dev
MCP ToolsSelection & Context

select_sketch

Set the canvas selection to one or more sketches by ID.

Input Schema

ParameterTypeRequiredDescription
sketchIdsstring[]yesIDs of sketches to select
addToSelectionbooleannoAdd to existing selection instead of replacing (default: false)

Output Shape

{
  "success": true,
  "selected": ["noise-grid", "flow-field"],
  "selectionCount": 2
}

Side Effects

  • Updates in-memory selection state
  • Sends selection:changed sidecar notification

Error Cases

ConditionError
No workspace open"No workspace is currently open"
Unknown sketch ID"Sketch not found: 'bad-id'"
Empty sketchIds array"At least one sketch ID is required"

Golden Path Example

Request:

{ "sketchIds": ["noise-grid"], "addToSelection": false }

Response:

{
  "success": true,
  "selected": ["noise-grid"],
  "selectionCount": 1
}