photoshop_create_clipping_mask
Clips the active or named layer to the opaque pixels of the layer directly below, so the layer is visible only over that base layer's content.
Instructions
Create a clipping mask on the active layer (or a named layer).
Users often say: clip to layer below, clipping mask, clip this layer, mask to shape below.
Use when: the active layer should be visible only where the layer directly below it has opaque pixels. Do NOT use when: the layer is already clipped — returns success with already_clipping. Do NOT use when: the layer is the bottom-most layer — there is no base layer to clip into.
Returns: JSON { ok, summary, details: { layer_name, is_clipping, already_clipping? } }. Preconditions: active document; target layer must sit directly above the base layer below it in the same group/stack. Side effects: one history step (groupEvent).
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "photoshop_create_clipping_mask"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| layer_name | No | Optional exact layer name (recursive search). Default: active layer. | |
| 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. |