Skip to main content
Glama

draw_pixels

Set individual pixels to exact colors in Aseprite sprites without blending, with later entries overriding earlier ones and out-of-canvas pixels skipped.

Instructions

Set individual pixels to exact colours (no blending; a later entry wins).

Pixels outside the canvas are skipped and counted in skipped_outside. The cel grows to take in pixels outside it; content beyond the canvas is kept. Works on every colour mode: indexed sprites get the nearest palette entry, 'transparent' writes the transparent index. A background layer stays opaque: alpha is ignored there, so 'transparent' paints opaque black (the nearest palette colour on indexed sprites).

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>",
      "pixels": "<pixels>"
    },
    "name": "draw_pixels"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesSprite file. Relative paths resolve against the server root.
frameNo1-based frame number
layerNoLayer name or 'group/child' path; empty = the bottom-most normal layer
pixelsYesPixels as {x, y, color}
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

A4.2/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full burden and does substantial work: no blending, last-entry-wins ordering, out-of-canvas pixels skipped and counted, cel growth, and per-colour-mode behaviour (nearest palette entry on indexed sprites, transparent index writes). It stops short of covering overwrite/destructive implications for existing content or any performance/rate considerations.

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 tight sentences, front-loaded with the core action, then out-of-bounds handling, then colour-mode rules. No filler; each sentence introduces a distinct behavioural fact an agent would otherwise have to discover by trial.

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 5-parameter mutation tool with no annotations, the description covers the risky edge cases (out-of-bounds, colour mode conversion, background-layer alpha) that matter most, and it references skipped_outside even though an output schema exists. It does not discuss permissions, atomicity across the pixel list, or what happens to pre-existing content in the target area, which keeps it from a 5.

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 the baseline is 3, but the description adds real semantic depth on top: what 'transparent' actually paints on a background layer (opaque black), how indexed modes reinterpret colours, and what happens to coordinates outside the canvas. The 'cel grows' remark also implicitly explains create_cel behaviour.

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 resource — "Set individual pixels to exact colours" — which is clearly distinct from the sibling shape-drawing tools (draw_line, draw_rect, draw_polygon) and from read_pixels/find_stray_pixels. The parenthetical clarifying exact-write semantics further narrows the purpose.

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?

The description implies usage (raw pixel writing rather than geometric drawing) and warns that later entries win, but never states when an agent should pick this over draw_line/draw_rect or batch alternatives. No explicit exclusions or preconditions such as frame/layer requirements are given, leaving routing to inference.

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