Skip to main content
Glama

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

NameRequiredDescriptionDefault
xYesCanvas x of the top-left pixel
yYesCanvas y of the top-left pixel
pathYesSprite file. Relative paths resolve against the server root.
rowsYesArt rows, top to bottom
blendNofalse: 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
frameNo1-based frame number
layerNoLayer name or 'group/child' path; empty = the bottom-most normal layer
legendYesCharacter -> colour
outlineNoColour for a 1-pixel ring around the art
create_celNoAdd an empty cel when the layer has none in that frame

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden, and it does disclose real behavior: '.' and ' ' are no-ops and illegal legend keys, outline paints only neighbours of non-transparent art pixels, off-canvas pixels are skipped, and the return counters (painted, skipped_outside) are explained. It omits overwrite/erase semantics and layer/cel side effects, which the schema partially covers via blend and create_cel.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose and coordinate anchor are front-loaded, and every sentence conveys a distinct rule with no filler. The material is dense and unbroken, so a short structural cue (e.g. separating geometry from legend/outline rules) would improve scanability slightly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 10-parameter, nested-object tool with an output schema, the definition covers the non-obvious semantics that schemas cannot express: pixel mapping, reserved characters, ragged rows, outline adjacency, and skip counting. Layer/frame targeting, blending, and cel creation are left entirely to the schema, which is acceptable given full coverage but leaves the description a step short of self-sufficient.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3, but the description adds genuine meaning: it defines how rows map onto (x, y), that rows may be ragged, that legend keys are single Unicode characters, and it expands outline from the schema's terse '1-pixel ring' into precise adjacency rules. That is value beyond the schema, not repetition.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description gives a specific verb and resource ('Draw pixel art written as text') and immediately clarifies the coordinate mapping and character-to-colour model, which separates it from raw pixel tools like draw_pixels. It stops short of naming or contrasting a sibling explicitly, so it is clear but not fully differentiated.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no when-to-use/when-not guidance and no alternatives are mentioned. The reader must infer that this is the tool for converting text/ASCII grids into pixels rather than using draw_text or draw_pixels. Only the implied use case carries the routing decision.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.