Skip to main content
Glama

Fill a rectangle

texture_fill_rect
DestructiveIdempotent

Fills a rectangular region of a texture with a single color, or clears it to transparent.

Instructions

Fills a rectangle of the texture with one colour (or clears it).

Input Schema

NameRequiredDescriptionDefault
hYes
wYes
xYes
yYes
colorYes"#rrggbb", "#rrggbbaa", or "clear" / null for transparent

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

C2.9/5.0
Behavior3/5

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

The annotations already declare destructiveHint=true, idempotentHint=true and readOnlyHint=false, so the safety profile is covered without the description. The description adds little beyond that — it does not say that existing pixels in the region are overwritten, what happens at bounds, or how the 'clear' path differs from color=null, which the schema already documents.

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?

A single short sentence with the operation front-loaded and no filler. The parenthetical clarification about clearing is useful and compact; the definition is terse rather than bloated, with its deficiency being under-specification scored elsewhere.

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

Completeness2/5

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

This is a five-parameter destructive write with no output schema and no annotations beyond hints, and the description omits the facts an agent needs: that the fill overwrites existing pixel data, how out-of-range rectangles are handled, and whether the rectangle is clipped to the texture. For a mutating tool at this complexity, that is a substantial gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is only 20% — only color carries a description — so the description must compensate for x, y, w and h. It says only that a "rectangle" is filled, leaving coordinate origin, units, whether w/h are inclusive or exclusive, and clipping behavior at the 0–4096 bounds entirely unexplained.

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 states a specific verb and resource ("fills a rectangle of the texture") and adds the variant behavior of clearing. It is clearly distinguishable from texture_set_pixels and texture_draw by its rectangular region scope, though it never names those siblings to make the distinction explicit.

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?

There is no guidance on when to choose this over texture_set_pixels or texture_draw, nor any prerequisites or exclusions. The agent must infer that this is the bulk-fill option from the phrase "rectangle" alone.

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