image_crop
Crops a specified rectangular region from an image using x/y pixel coordinates from the top-left, saving the result to a new output file.
Instructions
Crop a rectangle from an image. x and y are pixels from the top-left corner.
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": {
"input_path": "<input_path>",
"output_path": "<output_path>",
"x": "<x>",
"y": "<y>",
"width": "<width>",
"height": "<height>"
},
"name": "image_crop"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | Yes | ||
| y | Yes | ||
| width | Yes | ||
| height | Yes | ||
| overwrite | No | ||
| input_path | Yes | ||
| output_path | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| width | Yes | ||
| format | Yes | ||
| height | Yes | ||
| crop_box | Yes | ||
| output_path | Yes | ||
| output_bytes | Yes |