game_canvas_draw
Draw 2D shapes and text on a Godot canvas using line, rect, circle, polygon, and text actions. Clear the canvas as needed.
Instructions
2D drawing: line/rect/circle/polygon/text/clear
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": {
"action": "<action>"
},
"name": "game_canvas_draw"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | End point {x,y} | |
| from | No | Start point {x,y} | |
| rect | No | Rectangle {x,y,w,h} | |
| text | No | Text to draw | |
| color | No | Draw color {r,g,b,a} | |
| width | No | Line width. Default: 2 | |
| action | Yes | Action: line, rect, circle, polygon, text, clear | |
| center | No | Center point {x,y} | |
| filled | No | Fill shape. Default: true | |
| points | No | Polygon points [{x,y},...] | |
| radius | No | Circle radius | |
| fontSize | No | Text font size. Default: 16 | |
| position | No | Text position {x,y} (baseline, for text) | |
| parentPath | No | Parent node path for draw node |