photoshop_delete_layer
Removes the active layer and its pixels, mask, and effects from the Photoshop document stack. Use it when a layer must be deleted, not just hidden or flattened.
Instructions
Delete the active layer, including its pixels, mask, and effects.
Use when: the user wants that layer removed from the stack. Do NOT use when: it should only be hidden — use photoshop_set_layer_visibility. Do NOT use when: only the mask should go — use photoshop_delete_layer_mask. Do NOT use when: the whole stack should collapse — use photoshop_flatten_image.
Returns: confirmation that the layer was deleted. Preconditions: active document and a deletable active layer. Side effects: destroys the layer. Reversible with photoshop_undo while history holds it.
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. |