Skip to main content
Glama

draw_line_to_render_target

Destructive

Draw a line into a render target via canvas using start and end screen-space pixels; identical points skip the zero-length line and return drawn false.

Instructions

Draw a line into a render target via the canvas. drawn is false, and the call fails, when start and end are the same point (the canvas skips a zero-length line).

Returns: { render_target_path: string, drawn: bool, thickness: number, start: [number], end: [number] }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
endYesLine end position [x, y] in screen-space pixels
colorNoOptional [r, g, b, a] line color, defaults to opaque white
startYesLine start position [x, y] in screen-space pixels
thicknessNoOptional line thickness in pixels, default 1
render_target_pathYesAsset path of the destination render target

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A3.5/5.0
Behavior4/5

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

Annotations already declare readOnly=false and destructive=true, so the safety profile is covered. The description earns credit by disclosing a non-obvious behavioral quirk the annotations cannot: a zero-length line sets drawn=false and fails the call.

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?

Two sentences, purpose front-loaded, then the edge case and return shape. Efficient, though the inline return literal is somewhat dense.

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?

There is no output schema, so including the return shape (render_target_path, drawn, thickness, start, end) is valuable and fills that gap. Combined with the edge-case note and full schema coverage, an agent has enough to call this correctly.

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?

Schema description coverage is 100%, so the schema already documents all five parameters including defaults for color and thickness. The description adds only the start/end inequality constraint; baseline 3 is appropriate.

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: drawing a line (not text, texture, or material) into a render target via the canvas. The resource distinguishes it from siblings like draw_text_to_render_target, but the description never names those siblings or states the shared exclusion explicitly.

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 when-to-use guidance relative to the other draw_*_to_render_target siblings or clear_render_target. The only conditional given is an edge case (equal start/end), which is a failure condition rather than selection guidance.

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