photoshop_select_layer_by_name
Select a layer in Photoshop by its exact name, even inside groups, to make it the active layer for transforms or property edits.
Instructions
Select the active layer by exact name, including layers inside groups.
Use when: a transform or property tool must target a named layer (photoshop_scale_layer, etc.). Do NOT use when: the layer is already active — check photoshop_get_state first.
Returns: selected, layerName, kind, bounds (best-effort), context. First depth-first name match wins when duplicate names exist in different groups. Preconditions: active document. Side effects: changes active layer.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Exact layer name (case-sensitive) | |
| 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. |