art.canvas.draw_rect
Draw a rectangle on a canvas by specifying top-left coordinates, width, height, and color. Choose solid fill or outline to add game art elements.
Instructions
Draw a rectangle on 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": {
"session_id": "<session_id>",
"x": "<x>",
"y": "<y>",
"width": "<width>",
"height": "<height>",
"color": "<color>"
},
"name": "art.canvas.draw_rect"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | Yes | Top-left X coordinate | |
| y | Yes | Top-left Y coordinate | |
| color | Yes | Fill/stroke color as hex string | |
| width | Yes | Rectangle width | |
| filled | No | Whether to fill the rectangle (default true) | |
| height | Yes | Rectangle height | |
| session_id | Yes | Canvas session ID |