photoshop_contract_selection
Shrink the active pixel selection inward by a specified pixel amount to tighten loose selections or trim halos after expanding. Requires an existing selection and returns JSON with selection details.
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 | No | Optional 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. |