Skip to main content
Glama

select

Destructive

Make a selection, saved as a NAMED channel (no live selection persists between calls): rectangle, ellipse, polygon, colour range, magic wand, layer transparency, gradient, or another channel. Combine with add, subtract or intersect by reusing a name. Use the channel as add_adjustment's or add_effect's mask when creating a filter, or layer_mask for a real layer mask. Make selections after straighten, resize and crop.

Input Schema

NameRequiredDescriptionDefault
xNorectangle/ellipse/magic_wand, or color_range's sample point: left edge or point x, in image pixels from the canvas origin, also when `layer` names a layer that sits at an offset (never counted from that layer's own corner).
yNorectangle/ellipse/magic_wand, or color_range's sample point: top edge or point y, in image pixels from the canvas origin, also when `layer` names a layer that sits at an offset (never counted from that layer's own corner).
cxNogradient_radial: center x, document pixels. Default the image's own center.
cyNogradient_radial: center y, document pixels. Default the image's own center.
x1Nogradient_linear: start point x, document pixels. Default 0.
x2Nogradient_linear: end point x, document pixels. Default the image's width.
y1Nogradient_linear: start point y, document pixels. Default 0.
y2Nogradient_linear: end point y, document pixels. Default 0.
modeYesrectangle/ellipse: x, y, width, height. polygon: points (>=3 [x,y] pairs). color_range: every pixel near `color` (hex) or the colour at a sample point x,y, anywhere in the image. magic_wand: the contiguous region around x,y. alpha: a layer's opaque pixels. channel: copy another saved selection (`source`). gradient_linear: a ramp from (x1,y1) to (x2,y2), default the full image width. gradient_radial: a ramp from full effect at the center (cx,cy) fading to none at radius, default centered at the image's own center with radius = half the shorter side.
nameNoChannel to save the selection in (replaced).Selection
colorNocolor_range: a hex colour like "#c0392b".
imageYesImage id, as returned by open_photo.
layerNoLayer name. Defaults to the selected layer, or the topmost layer if none is selected. alpha: which layer. color_range/magic_wand: only matters when sample_merged:false (otherwise the visible composite is sampled, and which layer this names makes no difference to the result).
widthNorectangle/ellipse: width, document pixels.
heightNorectangle/ellipse: height, document pixels.
invertNoApplied to the NEW shape alone, before any `combine`. rectangle/ellipse/polygon/color_range/magic_wand/alpha/channel: invert the selection. gradient_linear/gradient_radial: swap which end is black vs white.
pointsNopolygon: 3-10,000 [x, y] pairs, document pixels.
radiusNogradient_radial: radius, document pixels. Default half the shorter image side.
sourceNomode=channel: the saved selection to copy.
combineNoCombine with the existing saved selection of the same `name` (like shift/alt in a GUI). `invert`/`feather_px` apply to the NEW shape alone, before it is combined.replace
layer_idNoLayer id, as inspect (and any tool that creates a layer) reports it. Takes priority over `layer`, and is the only way to address one of two layers that share a name. alpha: which layer. color_range/magic_wand: only matters when sample_merged:false.
thresholdNocolor_range/magic_wand tolerance, 0-255.
feather_pxNoFeather radius in document pixels, applied to the NEW shape alone before any `combine`. Refused (nonzero) on gradient_linear/gradient_radial -- already a continuous ramp, nothing to feather.
sample_mergedNocolor_range/magic_wand: sample the visible composite. false samples the one named/selected layer's own raw pixels instead.

Output Schema

NameRequiredDescriptionDefault
channelNo
fractionNo
selected_pixelsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and non-idempotence, so the safety profile is covered. The description adds real context beyond them: no live selection persists between calls and the result lives in a named channel that later combine operations reuse. It does not explicitly warn that an existing channel of the same name is overwritten (the schema says this).

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?

Four dense, front-loaded sentences with no filler; the channel model comes first, then combining, then downstream use, then ordering. The trailing 'Make selections after straighten, resize and crop' is slightly abrupt but earns its place as sequencing guidance.

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?

For a 24-parameter, 10-mode tool with an output schema, the definition covers purpose, mode landscape, combination semantics, downstream consumption and ordering. Return values are handled by the output schema, and the only real gap is explicit routing away from sibling selection tools.

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% and the per-parameter docs are unusually rich (mode semantics, defaults, coordinate origins), so the schema carries the burden. The prose adds mode-level framing but no parameter detail beyond what the schema already states, making the baseline 3 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?

The description names a specific verb and resource ('Make a selection, saved as a NAMED channel') and enumerates the supported modes, so the agent knows exactly what the tool produces: a saved channel, not a live selection. It stops short of naming sibling alternatives such as select_with_ai or modify_selection, so it is clear but not fully differentiated.

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

Usage Guidelines4/5

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

It gives concrete usage conditions: combine via add/subtract/intersect by reusing a name, consume the channel as add_adjustment/add_effect's mask or layer_mask, and sequence it after straighten/resize/crop. It does not say when to prefer this over select_with_ai or modify_selection, so the 'vs alternatives' half is missing.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources