paint_selection
Set an exact pixel selection mask to constrain later raster edits, using rectangles, polygons, ellipses, inversion, feathering, growth, shrinking, flood fill, or layer opacity.
Instructions
Set an exact pixel selection mask immediately. rectangle=[left,top,right,bottom], document pixels, corners in any order; may extend past the canvas; zero size selects nothing. antialias=false gives hard 0/255 edges (polygons use the pixel-centre rule, [x0,x1)). smooth=true makes a polygon a smooth curve through its points. from_layer/flood read layer_id (default active); from_layer threshold 1..255 selects pixels at least that opaque, hard. feather/grow/shrink radius <=100; grow/shrink are round (Euclidean), so circles stay circles. Flood tolerance 0..255 (binary). Selection constrains subsequent raster operations.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "paint_selection"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| point | No | ||
| action | No | none | |
| points | No | ||
| radius | No | ||
| smooth | No | ||
| layer_id | No | Target layer id or unique layer name; the active layer stays unchanged. Default: active layer | |
| antialias | No | ||
| operation | No | replace | |
| rectangle | No | ||
| threshold | No | ||
| tolerance | No | ||
| document_id | No | Target this document instead of the shared active one (recommended when several agents share the server) | |
| sample_merged | No |