MCP ToolsSelection & Context
select_sketch
Set the canvas selection to one or more sketches by ID.
Input Schema
| Parameter | Type | Required | Description |
|---|---|---|---|
sketchIds | string[] | yes | IDs of sketches to select |
addToSelection | boolean | no | Add 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:changedsidecar notification
Error Cases
| Condition | Error |
|---|---|
| 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
}