draw_ascii
Draws pixel art from text rows onto a sprite at a given position, mapping legend characters to colors and optionally adding a 1-pixel outline.
Instructions
Draw pixel art written as text; the first character of the first row is at (x, y).
Each character is one pixel in its legend colour; '.' and ' ' leave the pixel as it is and cannot be legend keys. Keys are single characters (any Unicode character). Rows may differ in length. outline paints every pixel next to (left, right, above, below) a non-transparent art pixel that is not part of the art itself. Pixels off the canvas are skipped and counted in skipped_outside; painted counts art and outline pixels.
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>",
"x": "<x>",
"y": "<y>",
"rows": "<rows>",
"legend": "<legend>"
},
"name": "draw_ascii"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | Yes | Canvas x of the top-left pixel | |
| y | Yes | Canvas y of the top-left pixel | |
| path | Yes | Sprite file. Relative paths resolve against the server root. | |
| rows | Yes | Art rows, top to bottom | |
| 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 | |
| frame | No | 1-based frame number | |
| layer | No | Layer name or 'group/child' path; empty = the bottom-most normal layer | |
| legend | Yes | Character -> colour | |
| outline | No | Colour for a 1-pixel ring around the art | |
| create_cel | No | Add an empty cel when the layer has none in that frame |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||