Selection
selectCreate or modify a canvas mask that confines all painting, fills, filters, and clears; supports shapes, wand/color picking, feathering, and replace/add/subtract/intersect modes.
Instructions
Create/modify the selection. While a selection exists, ALL painting, fills, filters and clears are confined to it (soft edges with feather). action: rect{x,y,w,h,radius} | ellipse{cx,cy,rx,ry|r,rotation} | polygon/lasso{points} | path{d} | wand{x,y,tolerance,contiguous,sample,layer} | color{x,y,tolerance} | layer_alpha{layer} | all | none | invert | feather{amount} | grow{amount} | shrink{amount} | border{amount} | smooth{amount}. mode: replace (default) | add | subtract | intersect.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"action": "<action>"
},
"name": "select"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| d | No | SVG path | |
| h | No | ||
| r | No | ||
| w | No | ||
| x | No | ||
| y | No | ||
| cx | No | ||
| cy | No | ||
| rx | No | ||
| ry | No | ||
| mode | No | ||
| layer | No | ||
| action | Yes | ||
| amount | No | px for feather/grow/shrink/border/smooth | |
| points | No | ||
| radius | No | ||
| sample | No | ||
| feather | No | Feather the new shape by px | |
| fillRule | No | ||
| rotation | No | ||
| tolerance | No | ||
| contiguous | No |