Select part of a photo
photo_selectFind part of the photo so an adjustment applies only there: kind "subject" (the main subject), "background" (everything but it), "sky", or "object" with points [{x, y, label: 1 (this) or 0 (not this)}] and/or a box {x, y, w, h} around it, all fractions of the photo as it is drawn after its crop, straighten and turn (as photo_look shows it). A segmentation model on our own server picks the pixels of the photo's preview copy; it never makes any. refine (default true) runs edge-aware guided and luminance alpha matting so fine pine needles, branches and hair produce clean fractional alpha mattes with zero color halo when graded; feather (0 to 0.05 of the long side) softens it; name names it. The reply gives the selection's id, how much of the picture it covers, and a look of it (the photo darkened outside it). Then use it as a mask in photo_edit: {add: {op: "exposure", ev: 0.3, name: "lift-subject", mask: {select: {id}}}}, or {select: {id}, invert: true} for everything but it. A subject takes about 15 s, a point or box a few seconds, the sky under a second. Counts against your user's smart selections a month. Needs the photo engine: without it, use shapes or a range mask. Change the crop, straighten or turn afterwards and the selection no longer lines up: select again.
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": {
"kind": "<kind>"
},
"name": "photo_select"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| box | No | ||
| kind | Yes | ||
| name | No | ||
| canvas | No | ||
| points | No | ||
| refine | No | ||
| feather | No |