crop_to_rect
Crops an image canvas to a specified rectangle using x, y, width, and height coordinates. Use it to trim canvas edges or isolate a defined region in GIMP.
Instructions
Crop the image canvas to an explicit rectangle.
Parameters:
x, y: Top-left corner of the crop rectangle
width, height: Dimensions of the crop rectangle
image_index: Target image index (default 0)
Returns: {status, x, y, width, height}
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": {
"x": "<x>",
"y": "<y>",
"width": "<width>",
"height": "<height>"
},
"name": "crop_to_rect"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | Yes | ||
| y | Yes | ||
| width | Yes | ||
| height | Yes | ||
| image_index | No |