photoshop_move_layer_to_position
Reorder the active layer above, below, at the top, or at the bottom of a named layer in Photoshop to change stacking order without altering canvas pixels.
Instructions
Reorder the active layer relative to a named layer. position is ABOVE, BELOW, TOP, or BOTTOM of targetLayerName. This changes stacking order, not canvas pixels.
Use when: the active layer must sit above or below a specific other layer. Do NOT use when: it should go to the top or bottom of the whole stack — use photoshop_move_layer_to_top or photoshop_move_layer_to_bottom. Do NOT use when: it should move one step — use photoshop_move_layer_up or photoshop_move_layer_down. Do NOT use when: you mean a pixel offset on the canvas — use photoshop_move_layer.
Returns: text confirmation of the new stack position. Preconditions: active document, an active layer, and an existing targetLayerName. Side effects: stacking order only. Reversible with photoshop_undo.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| position | Yes | Position relative to target layer | |
| 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. | |
| targetLayerName | Yes | Name of the layer to move relative to |