photoshop_merge_visible_layers
Combine all visible layers into one layer while leaving hidden layers untouched. Use when you need visible content merged in Photoshop without flattening the whole document.
Instructions
Merge every visible layer into one layer. Hidden layers stay in the stack.
Use when: the user wants visible layers combined and hidden layers kept. Do NOT use when: every layer, including hidden ones, should become a single Background — use photoshop_flatten_image. Do NOT use when: only two named layers should combine — this always merges all visible layers.
Returns: confirmation that visible layers were merged. Preconditions: active document with at least one visible layer. Side effects: destroys the separate visible layers in one history step. Reversible with photoshop_undo.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| 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. |