photoshop_rename_layer
Rename the active Photoshop layer to give it a stable name for later selection by name, without changing pixels, order, or visibility.
Instructions
Rename the active layer. Does not change pixels, order, or visibility.
Use when: the active layer needs a stable name for a later photoshop_select_layer_by_name. Do NOT use when: many layers should be renamed by kind — use photoshop_recipe_organize_layers. Do NOT use when: a different layer is the target — use photoshop_select_layer_by_name first.
Returns: the new layer name. Preconditions: active document and active layer. Side effects: the name only. Setting the same name is idempotent. Reversible with photoshop_undo.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | New name for the 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. |