Skip to main content
Glama

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

TableJSON Schema
NameRequiredDescriptionDefault
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
Behavior4/5

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

With no annotations, the description carries the full behavioral burden. It discloses preconditions ('active document and active selection'), side effects ('adds mask to active layer'), and the return signal ('maskCreated confirmation'), while also noting the operation is non-destructive. It could go further by describing failure behavior when preconditions are unmet, but the key behavioral traits are present.

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 compact, front-loaded with the core definition, and each subsequent line adds distinct value: user phrasing, usage boundaries, returns, preconditions, and side effects. There is no 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 simple tool with one optional parameter and no output schema, this description covers everything an agent needs to invoke it correctly: what it does, when to use/avoid it, required preconditions, side effects, and the confirmation return. The alternative recipe reference also provides broader context.

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%, and the single optional document_id parameter is already well documented in the schema. The description does not repeat parameter details, which is appropriate; it adds minor context by mentioning 'active document' as a precondition, but the schema already does the substantive work.

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 opens with a specific verb and resource: 'Create a layer mask on the active layer from the current selection (reveal selection).' It distinguishes the operation from siblings by emphasizing 'layer mask' and 'reveal selection,' and user phrasing like 'mask this' and 'non-destructive cutout' reinforces what the tool does without ambiguity.

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

Usage Guidelines5/5

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

Explicit 'Use when' and 'Do NOT use when' guidance is provided, including a concrete alternative ('create selection first or use remove_background recipe'). This makes the selection condition unmistakable and routes agents away from invalid calls.

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