Skip to main content
Glama

draw_pixels

Plot individual pixels at exact coordinates with optional per-pixel colors, targeting a layer and frame, and report written or clipped pixels.

Instructions

Plot individual pixels.

Args: pixels: List of {"x": int, "y": int, "color": "#hex"?}. If a pixel omits "color", the shared color argument is used. color: Default colour for pixels that don't specify their own. layer: Target layer name or 1-based index (default: top layer). frame: Target frame, 1-based (default 1).

Coordinates: (0, 0) is the top-left pixel. x grows right, y grows DOWN. A span given as position plus size covers x .. x + width - 1, so width is a count of pixels, not an offset to the far edge.

Centring differs between primitives, so check this when aligning two shapes:

  • draw_rectangle(x, width) spans x .. x+width-1, centred on x + (width-1)/2. An even width therefore centres on a half pixel.

  • draw_ellipse(center, radius) spans center-radius .. center+radius, which is always an ODD 2*radius+1 pixels wide and always centred on a whole pixel.

  • draw_ellipse_in_box(x, y, width, height) takes the same bounding box as draw_rectangle and fills it exactly, so it is the one to use for an even diameter, a disc centred on an even canvas, or a circle that has to line up with a rectangle.

  • draw_symmetric_pixels mirrors about the canvas, not about either of the above.

Writes falling outside the canvas are dropped rather than raising. Every drawing tool reports pixels_written, and pixels_clipped when anything was dropped, so compare those against what you asked for rather than trusting ok.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
colorNo
frameNoDefault: 1.
layerNo
pixelsYes
filenameYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed13 schema fields changedv0.10.0
    • removedInput schema / properties / color / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedInput schema / properties / color / default
      Removed value: -null
    • removedInput schema / properties / color / title
      Removed value: -"Color"
    • addedInput schema / properties / color / type
      Added value: +"string"
    • removedInput schema / properties / filename / title
      Removed value: -"Filename"
    • addedInput schema / properties / frame / description
      Added value: +"Default: 1."
    • removedInput schema / properties / frame / title
      Removed value: -"Frame"
    • removedInput schema / properties / layer / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedInput schema / properties / layer / default
      Removed value: -null
    • removedInput schema / properties / layer / title
      Removed value: -"Layer"
    • addedInput schema / properties / layer / type
      Added value: +"string"
    • removedInput schema / properties / pixels / title
      Removed value: -"Pixels"
    • removedInput schema / title
      Removed value: -"draw_pixelsArguments"
  2. First observedv0.7.0

TDQS

A4/5.0
Behavior5/5

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

Goes well beyond the annotations (readOnlyHint=false, openWorldHint=false) by disclosing that out-of-canvas writes are silently dropped rather than raising, that pixels_written/pixels_clipped are reported, and advising the agent not to trust `ok`. These are exactly the failure-mode details an agent needs before calling a mutation tool.

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?

Front-loaded with the core purpose and the args block, then the coordinate and centring conventions. The centring bullets lean toward sibling-tool documentation, but each carries useful alignment information and nothing is padding.

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?

No output schema exists, and the description compensates by naming the returned counters (pixels_written, pixels_clipped) and their clipping semantics, plus the coordinate origin and drop-outside-canvas rule. The main gap is that `filename` is never tied to a canvas/sprite concept.

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?

With only 20% schema description coverage, the description carries the load well: it documents the pixel object shape ({x, y, color?}), the fallback `color`, `layer` accepting a name or 1-based index with a default of top layer, and `frame` being 1-based with default 1. Only the required `filename` parameter is left unexplained anywhere.

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?

States a specific verb and resource: "Plot individual pixels" with a per-pixel list contract. It is clearly a raster-primitive tool, though it never explicitly distinguishes itself from the nearby sibling draw_pixel_map or draw_brush, leaving the agent to infer the difference.

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 context is implied rather than stated: the centring section tells the agent which primitive to pick for even vs odd diameters, but that is guidance about sibling tools. There is no explicit "use draw_pixels when... / prefer draw_pixel_map when..." routing for this tool itself.

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

Deploy Server

Other Tools