crop_image
Crops an image to an exact pixel rectangle using x/y top-left offsets; validates the rectangle bounds and returns a clear error if it falls outside the image.
Instructions
Crop to an exact pixel rectangle.
x/y are the top-left offset in DISPLAYED orientation. Fails clearly if the rectangle falls outside the image rather than silently clamping.
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>",
"width": "<width>",
"height": "<height>"
},
"name": "crop_image"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | ||
| y | No | ||
| width | Yes | ||
| height | Yes | ||
| backend | No | ||
| quality | No | ||
| input_path | Yes | ||
| output_path | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |