Skip to main content
Glama

draw_line

Draw a line between two pixel coordinates using Bresenham's algorithm, adding a colored line to a canvas for pixel-art creation.

Instructions

Draw a line between two points using Bresenham's algorithm.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
x1YesStart X
x2YesEnd X
y1YesStart Y
y2YesEnd Y
colorYesLine color
canvasNoCanvas namedefault

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden of explaining behaviors such as mutating a canvas, selecting which canvas to draw on, handling out-of-bounds coordinates, or what the tool returns. Saying it uses Bresenham's algorithm hints at rasterization but does not disclose the actual side effects or error behavior.

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?

One concise sentence with the core action front-loaded and no filler. The algorithm reference is optional but does not make the description bloated.

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 schema fully documents parameters, and the purpose is clear enough to select the tool. But the description omits the canvas context, side effects, and any return or error behavior, which makes it only minimally complete for an agent without annotations or an output schema.

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?

The input schema already describes all parameters with 100% coverage, so the baseline is 3. The description's 'between two points' loosely maps to the x1/y1 and x2/y2 pairs but adds no extra meaning about coordinate constraints, color format, or the optional canvas parameter.

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?

The description uses a specific verb ('Draw') and resource ('a line between two points'), which clearly distinguishes it from sibling tools like set_pixel, fill_rect, and clear. The Bresenham mention adds detail without obscuring what the tool does.

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 use case is implied: use this when you need to draw a line between two points. However, there is no explicit guidance about when not to use it or which sibling tool would be a better alternative for related shapes or pixel-level operations.

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