Skip to main content
Glama

select_region

Select a rectangular, elliptical, or polygonal region so later pixel edits only affect that area until cleared.

Instructions

Select a region, so later edits only affect that area.

The selection persists until `deselect`, and every pixel-writing tool honours it.
There is no per-call override: to draw outside the selection, clear it first. Tools
that wrote fewer pixels than asked report `selection_applied` and
`pixels_outside_selection`, so a forgotten selection shows up in the result rather
than as a mysteriously incomplete edit.

Args:
    shape: "rect", "ellipse" (both use x/y/width/height) or "polygon" (uses points).
    x, y, width, height: The region. width/height default to the rest of the canvas.
    points: For "polygon", a list of {"x": int, "y": int}, at least 3.
    mode: "replace" the selection, or "add"/"subtract"/"intersect" with the current
        one. Building a selection from several shapes is how you scope an edit to
        an awkward area, such as everything except a character's eyes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
xNoDefault: 0.
yNoDefault: 0.
modeNoDefault: "replace".replace
shapeNoDefault: "rect".rect
widthNo
heightNo
pointsNo
filenameYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.10.0

TDQS

A4.9/5.0
Behavior5/5

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

Annotations only declare readOnlyHint=false and openWorldHint=false, so the description carries the real burden and delivers: selection persistence, cross-tool effect on every pixel-writing tool, no per-call override, and self-reporting via selection_applied/pixels_outside_selection so a stale selection is visible rather than silent. This is exactly the behavioral context annotations cannot express.

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?

Front-loaded with purpose and persistence semantics, then a structured Args block. Every sentence adds information (override behavior, failure reporting, composition motivation); no filler.

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

Completeness5/5

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

No output schema exists, and the description compensates by naming the result fields (selection_applied, pixels_outside_selection) returned by affected tools. Combined with full coverage of selection lifecycle and modes, an agent has everything needed to call and interpret this tool.

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 50% and its descriptions are trivial ('Default: 0'), so the description does the heavy lifting: it maps shape values to their coordinate requirements ('polygon' uses points), explains that width/height default to the rest of the canvas, and defines what mode does. The required 'filename' parameter is never mentioned, a minor gap.

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?

States a specific verb and resource ('Select a region') plus its scope consequence ('so later edits only affect that area'), which cleanly separates it from siblings like modify_selection, invert_selection, and deselect. An agent can identify the tool without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly explains persistence ('until deselect'), the absence of a per-call override, and the corrective action ('clear it first'). It also names the mode values and describes the composition workflow (add/subtract/intersect) with a concrete motivating example.

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