Skip to main content
Glama

photoshop_create_clipping_mask

Create a clipping mask to restrict a layer's visibility to the opaque pixels of the layer directly beneath it. Ideal for clipping an image or effect to a shape below.

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).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
layer_nameNoOptional exact layer name (recursive search). Default: active layer.
document_idNoOptional 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.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full responsibility for behavioral disclosure. It covers preconditions, the already_clipping success case, return JSON shape, and side effects (one history step). This is thorough and gives an agent a realistic model of what will happen.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured and front-loaded: the core action comes first, followed by user phrasings, usage conditions, return shape, preconditions, and side effects. Every section contributes actionable information without redundant filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with two optional parameters and no output schema, the description provides all necessary context: what the tool does, when to use it, when not to use it, preconditions, and the exact return contract. There is no obvious missing information an agent would need to call it successfully.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so both parameters are already documented in the input schema. The description adds little beyond what the schema provides, which matches the baseline of 3. The mention of 'named layer' reinforces the layer_name parameter but does not meaningfully extend it.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description starts with a specific verb and resource: 'Create a clipping mask on the active layer (or a named layer).' It also includes common user phrasings that help disambiguate intent, and the behavior is clearly distinct from siblings like photoshop_create_layer_mask and photoshop_release_clipping_mask.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit 'Use when' and 'Do NOT use when' conditions, including edge cases like already-clipped layers and bottom-most layers. It does not name a specific alternative tool, but the contraindications are clear enough to guide an agent away from misuse.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools