draw_rect
Draw rectangle outlines with adjustable thickness or filled rectangles onto a chosen sprite layer and frame, clipped to the canvas for pixel-art editing.
Instructions
Draw a rectangle outline (growing inwards with thickness) or a filled rectangle.
Clipped to the canvas.
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": {
"path": "<path>",
"rect": "<rect>",
"color": "<color>"
},
"name": "draw_rect"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fill | No | Fill the shape; false draws the outline only | |
| path | Yes | Sprite file. Relative paths resolve against the server root. | |
| rect | Yes | Rectangle in canvas pixels | |
| blend | No | false: pixels get exactly this colour (transparent erases, except on a background layer, which ignores alpha); true: the colour is alpha-blended over what is there | |
| color | Yes | '#RRGGBB', '#RRGGBBAA' or 'transparent' | |
| frame | No | 1-based frame number | |
| layer | No | Layer name or 'group/child' path; empty = the bottom-most normal layer | |
| thickness | No | Outline width inside the rect; ignored with fill | |
| create_cel | No | Add an empty cel when the layer has none in that frame |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||