crop_image
Crop an image by specifying a bounding box [x1,y1,x2,y2], with options to expand edges and choose coordinate units, then save and return the new path and dimensions.
Instructions
按坐标裁切图片(可边缘外扩),保存并返回路径与新尺寸。
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": {
"image": "<image>",
"box": "<box>"
},
"name": "crop_image"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| box | Yes | [x1,y1,x2,y2] | |
| image | Yes | ||
| coords | No | 坐标单位,默认 pixel | |
| out_path | No | ||
| expand_px | No | 四边外扩像素数,默认 0 |