Skip to main content
Glama

draw_polygon

Draw closed polygons through specified points in an Aseprite sprite, choosing filled or outline-only shapes clipped to the canvas.

Instructions

Draw a closed polygon through the points: filled (with its outline) or outline only.

Filling uses the even-odd rule, so self-intersecting shapes leave the overlapping parts empty. Clipped to the canvas.

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_polygon"
  }
}

Input Schema

NameRequiredDescriptionDefault
fillNoFill the shape; false draws the outline only
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
pointsYesCorners as {x, y}, in order
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.5/5.0
Behavior3/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 two real behavioral traits: even-odd fill (overlapping regions stay empty) and canvas clipping. However, for a mutating 8-parameter tool it says nothing about persistence, layer/frame targeting, cel creation, or blend interaction.

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?

Three short sentences, front-loaded with the shape and fill mode, then the two caveats. Terse fragments ("Clipped to the canvas") are efficient rather than confusing, though the line breaks are gratuitous.

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?

An output schema exists so return values need no explanation, but for a mutation tool with 8 parameters and zero annotations the description is thin on side effects — where pixels land, what create_cel does to the document, and whether blend applies to the outline as well as the fill.

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 rendering semantics the schema lacks — the even-odd fill rule and clipping — which explain how the fill flag actually behaves with self-intersecting paths. It still leaves blend, layer, frame and create_cel entirely 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?

States a specific verb and resource ("Draw a closed polygon through the points") plus the two output modes (filled with outline, or outline only). It is clearly distinct from draw_rect/draw_ellipse/draw_line by virtue of taking an ordered point list, though it never names those siblings.

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 only implied: an agent infers 'use this when the shape is a polygon' from the geometry, and the fill flag describes both modes. There is no explicit when-to-use/when-not or routing to draw_rect or draw_ellipse for simpler shapes.

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