Modify Selection
photopea_modify_selectionModify an existing selection by expanding, contracting, feathering edges, or inverting selected and unselected areas. Specify amount in pixels for expand, contract, or feather.
Instructions
Modify the current active selection. Requires an existing selection created by make_selection. For expand, contract, and feather, the amount parameter specifies pixels. Invert swaps selected and unselected areas.
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": "photopea_modify_selection"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | How to modify the selection: 'expand' grows it, 'contract' shrinks it, 'feather' softens edges, 'invert' swaps selected/unselected | |
| amount | No | Modification amount in pixels (required for expand, contract, feather; ignored for invert) |