Skip to main content
Glama

Selection

select

Create or modify a canvas mask that confines all painting, fills, filters, and clears; supports shapes, wand/color picking, feathering, and replace/add/subtract/intersect modes.

Instructions

Create/modify the selection. While a selection exists, ALL painting, fills, filters and clears are confined to it (soft edges with feather). action: rect{x,y,w,h,radius} | ellipse{cx,cy,rx,ry|r,rotation} | polygon/lasso{points} | path{d} | wand{x,y,tolerance,contiguous,sample,layer} | color{x,y,tolerance} | layer_alpha{layer} | all | none | invert | feather{amount} | grow{amount} | shrink{amount} | border{amount} | smooth{amount}. mode: replace (default) | add | subtract | intersect.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "action": "<action>"
    },
    "name": "select"
  }
}

Input Schema

NameRequiredDescriptionDefault
dNoSVG path
hNo
rNo
wNo
xNo
yNo
cxNo
cyNo
rxNo
ryNo
modeNo
layerNo
actionYes
amountNopx for feather/grow/shrink/border/smooth
pointsNo
radiusNo
sampleNo
featherNoFeather the new shape by px
fillRuleNo
rotationNo
toleranceNo
contiguousNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4/5.0
Behavior4/5

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

No annotations are supplied, so the description must carry behavioral disclosure. It does disclose the key side effect: while a selection exists, all painting, fills, filters, and clears are confined to it, with soft edges and feathering. It also states that mode defaults to replace. It does not cover reversibility, errors, or return values.

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?

The description is dense but front-loads the purpose and the critical confinement behavior. The long action enumeration is necessary for this tool and earns its space, though the single-paragraph format could be more scannable.

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?

For a 22-parameter tool with no annotations and no output schema, the description is adequate but incomplete. It covers purpose, action mapping, and the main behavioral effect, but many parameter semantics and return behavior remain unspecified.

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 only 14%, so the description must compensate. It does so substantially by mapping each action to its relevant parameters and explaining the mode values, though it leaves meanings such as tolerance, contiguous, sample, layer, fillRule, and rotation units unstated.

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: create or modify the selection. The action enumeration makes clear that it is not a shape-drawing or fill tool, and it distinguishes selection creation from selection modification.

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?

Implies that creating a selection confines painting, fills, filters, and clears, which is useful context. However, it does not explicitly say when to choose this tool over siblings or when to avoid it, and no alternatives are named.

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