crop_to_selection
Crop an image canvas to the current selection bounds, or enable autocrop to detect the crop area automatically instead. Use it to trim an image to a selected region.
Instructions
Crop the image canvas to the current selection bounds.
Parameters:
autocrop: If True, auto-detect crop bounds instead of using selection (default False)
image_index: Target image index (default 0)
Returns: {status, x, y, width, height} — crop region applied
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": "crop_to_selection"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| autocrop | No | ||
| image_index | No |