Skip to main content
Glama

modify_selection

Destructive

Expand, contract, border, feather, smooth, invert or harden a saved selection channel. Refused if the target channel already confines a filter.

Input Schema

NameRequiredDescriptionDefault
opYesexpand/contract/border/feather require `px` (> 0). harden: threshold a soft mask at 50%. smooth: round off jagged edges (`px` optional, floors at 1px).
pxNoRadius in document pixels, rounded to the nearest whole pixel. Required (> 0) for expand/contract/border/feather; optional for smooth; unused otherwise. expand/contract/border cap at 150 on an ordinary document, LOWER on a very large one (morphological ops whose cost scales with both the radius and the document's own megapixels — the error names the actual cap for that document when a value is refused); feather has no such cap up to 1000 (a blur, flat cost regardless of radius).
imageYesImage id, as returned by open_photo.
outputNoWrite to this saved selection instead of modifying `channel` in place.
channelYesThe saved selection to modify.

Output Schema

NameRequiredDescriptionDefault
channelNo
fractionNo
selected_pixelsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, readOnlyHint=false, idempotentHint=false, and openWorldHint=true, so the safety profile is carried. The description adds a genuine behavioral precondition not in the annotations: refusal when the target channel already confines a filter. It does not explain in-place overwrite semantics or auth/limits, so not a full 5.

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 tightly written sentences, purpose front-loaded, with the refusal constraint second. The op enumeration slightly duplicates the schema enum, which keeps it from a perfect score, but there is no wasted prose.

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?

With an output schema, rich annotations, and 100% schema description coverage, the description covers what an agent needs: what it edits, the operations, and the one refusal condition. It omits in-place vs output write behavior, but that is largely covered by the schema's output parameter.

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 enum values, px requirements, caps, and the optional output/channel semantics are fully documented in the schema itself. The description only restates the op list and adds no parameter meaning beyond the schema, which matches the baseline 3 when the schema does the heavy lifting.

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 uses a specific verb+resource (modify a saved selection channel) and enumerates the seven operations, making the scope clear without opening the schema. It implicitly distinguishes itself from siblings like select_with_ai and selection_preview, which create or preview selections rather than edit a saved one.

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?

The only usage guidance is the guard 'Refused if the target channel already confines a filter,' which tells the agent a precondition but not when to choose this over alternatives. No explicit when-not or sibling routing (e.g., selection_preview, select_with_ai) is provided.

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