Select rectangle
gimp_select_rectangleSelect a rectangular pixel region in a GIMP image and combine it with the current selection using replace, add, subtract, or intersect; feather edges and ignore areas outside the canvas.
Instructions
Select a rectangle (image pixels, origin top-left) combined with the current selection. The part outside the canvas is ignored. Selections are part of the image (undoable, saved in XCF).
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>",
"x": "<x>",
"y": "<y>",
"width": "<width>",
"height": "<height>"
},
"name": "gimp_select_rectangle"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | Yes | ||
| y | Yes | ||
| image | Yes | Image id from gimp_status, e.g. 'image:1@a1b2c3d4'. | |
| width | Yes | ||
| height | Yes | ||
| feather | No | Feather radius in pixels (0 = hard edge). | |
| operation | No | How the new shape combines with the current selection. | replace |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| empty | Yes | ||
| image | Yes | ||
| bounds | Yes | Bounding box of the selection, clipped to the canvas; null when empty. | |
| contains | No | Whether (probe_x, probe_y) is selected (> 50%), when a probe point was given. |