photoshop_contract_selection
Shrink the active pixel selection inward by a specified pixel amount. Use to tighten loose selections or trim halos after expanding; create a selection first if none exists.
Instructions
Contract (shrink) the active pixel selection inward by a pixel amount.
Use when: tightening a loose selection or trimming halo after expand. 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
| Name | Required | Description | Default |
|---|---|---|---|
| pixels | Yes | Pixels to contract by (minimum 1) | |
| document_id | Yes | Photoshop document id from photoshop_get_state / photoshop_list_documents. Send null or 0 to use the active document. A positive number activates that document before the tool runs. When no document is open, a stale id does not block the call. |