draw_rect
Draw a rectangle on a specified layer and frame of a sprite. Supports custom dimensions, color, fill, and stroke thickness.
Instructions
Draw a rectangle on a specific layer and frame
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": {
"filePath": "<filePath>",
"x": "<x>",
"y": "<y>",
"width": "<width>",
"height": "<height>",
"color": "<color>"
},
"name": "draw_rect"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filePath | Yes | Sprite file | |
| layerName | No | Target layer name | |
| frameNumber | No | Frame number (1-indexed, default: 1) | |
| x | Yes | Left edge | |
| y | Yes | Top edge | |
| width | Yes | Rectangle width | |
| height | Yes | Rectangle height | |
| color | Yes | Color as hex string (#RRGGBB), palette index, or {r,g,b,a} | |
| filled | No | Fill the rectangle (default: true) | |
| thickness | No | Stroke thickness in pixels (default: 1). Uses native Aseprite brush when > 1. | |
| savePath | No | Path to save |