draw_pixels
Draws pixel art from a character grid by mapping each character to a palette color, leaving unmapped characters unchanged; each call is a single undo step in Pixelorama.
Instructions
Draw pixels from a character grid. Each string in rows is one row of pixels; each character is looked up in palette. Characters that are not in the palette (such as '.') leave the pixel unchanged, so map a character to "transparent" to erase. Example: palette {"o": "#e8a33d", "d": "#7a4a12"}, rows [".oo.", "oddo", ".oo."]. The whole call is one undo step in Pixelorama.
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": {
"rows": "<rows>",
"palette": "<palette>"
},
"name": "draw_pixels"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | Left edge of the grid on the canvas | |
| y | No | Top edge of the grid on the canvas | |
| rows | Yes | ||
| frame | No | Frame index, from 0. Defaults to the current frame | |
| layer | No | Layer index, 0 is the bottom layer. Defaults to the current layer | |
| palette | Yes | Single character -> color |