Skip to main content
Glama

draw_tile

Paint exact pixel colors into a single tileset tile, updating every tilemap placement that shares the tile; append a new tile when needed.

Instructions

Set pixels of one tile in the layer's tileset; x and y are inside the tile.

Pixels get exactly the given colour (no blending; a later entry wins). Every placement of the tile changes, in every tilemap layer sharing the tileset. Tile 0 is the empty tile and cannot be painted; passing tile_count appends a new tile.

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>",
      "layer": "<layer>",
      "tile_index": "<tile_index>",
      "pixels": "<pixels>"
    },
    "name": "draw_tile"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesSprite file. Relative paths resolve against the server root.
layerYesTilemap layer name or 'group/child' path
pixelsYesPixels as {x, y, color} in the tile
tile_indexYesTile to paint; the tileset's tile count adds a new tile

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so well: exact colour assignment with no blending, last-write-wins ordering, and the crucial blast radius that every placement of the tile changes across every tilemap layer sharing the tileset. It also discloses two hard constraints (tile 0 is unpaintable, appending grows the tileset).

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

Conciseness5/5

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

Four short sentences, front-loaded with the core action, then the semantics, the blast radius, and the edge cases in descending order of importance. No filler or restatement of the tool name.

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?

Near-complete for a mutation tool with no annotations: scope of change, colour semantics, and edge cases are all covered, and an output schema exists so return values need no explanation. The one snag is calling the append trigger 'tile_count' when the actual parameter is 'tile_index', which could momentarily confuse an agent.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents all four parameters, including colour formats and pixel array bounds. The description adds only the coordinate frame ('x and y are inside the tile'), which the schema effectively signals with 'in the tile'; the rest is behavioural rather than parameter semantics.

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

Purpose5/5

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

States a concrete verb and target: 'Set pixels of one tile in the layer's tileset', with the coordinate frame ('x and y are inside the tile') pinned down immediately. That framing implicitly separates it from a general pixel-drawing sibling, since this edits a tileset tile rather than an image layer.

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

Usage Guidelines3/5

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

Usage is implied rather than stated - the description tells you the mechanics of painting a tile and the edge case that tile 0 cannot be painted, plus how to grow the tileset. It never says when to reach for this over a sibling like draw_pixels, nor does it name an alternative for non-tileset pixel work.

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