Skip to main content
Glama

draw_line

Render a polyline through ordered points on an Aseprite sprite, clipped to the canvas, with configurable color, thickness, layer, frame, and optional closed path.

Instructions

Draw a polyline through the points, clipped to the canvas.

The brush is a thickness x thickness square on every line pixel. Odd sizes are centred; even sizes reach one pixel further right and down (thickness 2 covers the pixel and its right/lower neighbours), so a horizontal line is exactly thickness rows tall.

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>",
      "points": "<points>",
      "color": "<color>"
    },
    "name": "draw_line"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesSprite file. Relative paths resolve against the server root.
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
colorYes'#RRGGBB', '#RRGGBBAA' or 'transparent'
frameNo1-based frame number
layerNoLayer name or 'group/child' path; empty = the bottom-most normal layer
closedNoAlso connect the last point to the first
pointsYesLine vertices as {x, y}, in order
thicknessNoBrush size in pixels
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

B3.4/5.0
Behavior3/5

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

With no annotations, the description must carry behavioral disclosure. It usefully explains clipping and exact brush rasterization (odd/even thickness), but does not state that drawing mutates the sprite file, what happens to existing pixels, permission/error conditions, or how layer/frame/cel defaults affect the write.

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?

Two short paragraphs, front-loaded with the core action, and no filler. The brush explanation is dense but every sentence adds precise drawing semantics.

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

Completeness3/5

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

The tool is a 9-parameter mutating drawing operation with no annotations. The description covers line rasterization well, but omits usage selection and mutation/error context, so it is not fully complete despite relying on a rich schema and output schema.

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. The description earns an extra point by clarifying thickness beyond the schema's 'Brush size in pixels', specifying odd/even centering and row coverage; it still leaves other parameters to the schema.

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 opens with a specific verb and resource ('Draw a polyline through the points') and adds the clipping constraint. It does not differentiate from sibling drawing tools such as draw_polygon or draw_pixels, so it stops short of a 5.

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?

No sentence tells the agent when to choose this tool over draw_polygon, draw_pixels, or other drawing siblings. Usage is only implied by the verb 'Draw', with no prerequisites or exclusions.

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