set_mask
Add or edit a layer mask using a rectangle, ellipse, image, or painted strokes; invert, feather, or hide all to control layer visibility.
Instructions
Layer mask (white = visible). kind rect/ellipse with box=[x,y,w,h] in document px, image with path (grayscale or alpha file, aligned to the layer content), or paint (to paint with mask_stroke; hide_all=true starts fully hidden). feather = soft edge px.
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": {
"layer": "<layer>"
},
"name": "set_mask"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| box | No | ||
| kind | No | rect | |
| path | No | ||
| layer | Yes | ||
| invert | No | ||
| density | No | ||
| feather | No | ||
| project | No | ||
| hide_all | No |