photoshop_create_layer_mask
Create a layer mask from the current selection to non-destructively hide or reveal parts of the active layer. Use when a selection exists to mask out backgrounds or isolate elements.
Instructions
Create a layer mask on the active layer from the current selection (reveal selection).
Users often say: mask this, hide the background, non-destructive cutout (after selection).
Use when: non-destructive hide/show after a selection exists. Do NOT use when: no selection exists — create selection first or use remove_background recipe.
Returns: maskCreated confirmation. Preconditions: active document and active selection. Side effects: adds mask to active layer.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| document_id | No | Optional Photoshop document id from photoshop_get_state / photoshop_list_documents. When set, the tool activates that document before running so a UI tab switch cannot retarget the edit. |