Skip to main content
Glama

photoshop_expand_selection

Expands the active pixel selection outward by a specified pixel amount to grow tight subject selections or add padding before feathering or filling.

Instructions

Expand the active pixel selection outward by a pixel amount.

Use when: growing a tight subject selection or adding padding before feather/fill. Do NOT use when: no selection exists — create one first.

Returns: JSON { ok, summary, details: { pixels, bounds?, context } }. Preconditions: active document and active pixel selection. Side effects: modifies selection.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pixelsYesPixels to expand by (minimum 1)
document_idNoOptional Photoshop document id from photoshop_get_state / photoshop_list_documents. When set, the tool activates that document before running so a UI tab switch cannot retarget the edit.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It does so admirably by stating preconditions (active document and active pixel selection), side effects ('modifies selection'), and the return format. It stops short of covering edge behaviors like what happens when expansion exceeds document bounds, but covers the essential safety profile.

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?

Perfectly structured and front-loaded: purpose sentence first, then usage guidance, then return format, then preconditions/side effects. Every sentence earns its place with zero filler or repetition of schema content.

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 tool with no output schema, the description compensates by stating the return format. It covers preconditions, side effects, and usage conditions. The return format description is somewhat generic (ok, summary, details) and could specify failure states, but it is complete enough for an agent to call the tool correctly.

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 schema already fully documents both parameters. The description's 'pixel amount' phrasing reinforces the pixels parameter but adds no meaning beyond the schema. Baseline 3 is appropriate since the schema does the heavy lifting.

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?

The description states a specific verb ('Expand') plus a clearly-scoped resource ('the active pixel selection') and the control parameter (pixel amount). It naturally distinguishes itself from the sibling inverse tool photoshop_contract_selection without needing to name it, since expanding vs contracting are unambiguous opposites.

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?

Explicit 'Use when' guidance (growing a tight subject selection, adding padding before feather/fill) and an explicit 'Do NOT use when' exclusion (no selection exists, create one first). This is textbook routing guidance that tells an agent exactly when to invoke this tool versus alternatives.

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