photoshop_create_layer_mask
Creates a layer mask on the active layer from the current selection to non-destructively hide or reveal areas. Use after making a selection to mask or hide background.
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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"document_id": "<document_id>"
},
"name": "photoshop_create_layer_mask"
}
}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. |