Skip to main content
Glama

photoshop_apply_layer_mask

Apply a layer mask to its layer, merging mask transparency directly into the layer's pixels. Finalize your edits by permanently baking the mask into the image.

Instructions

Apply (merge) the layer mask to the 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

B3.1/5.0
Behavior2/5

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

There are no annotations, so the description carries the full burden of behavioral disclosure. It does not state that applying a mask is permanent/destructive, that the target layer must be active or selected, or that the operation is only reversible via undo. The word 'merge' hints at destructiveness but does not make it explicit.

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

Conciseness4/5

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

The description is brief, front-loaded, and free of filler. The parenthetical '(merge)' is useful clarification. It is efficient, though a bit too terse to carry the behavioral context needed for a destructive operation.

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

Completeness2/5

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

With no annotations and no output schema, the description leaves out important context: the operation is destructive, requires an existing mask, and affects the currently active layer. An agent would need background Photoshop knowledge or external information to invoke this safely and confidently.

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?

The input schema has 100% coverage and fully documents the optional document_id parameter, including its role in activating the document. The tool description adds no additional parameter meaning, so the baseline of 3 is appropriate.

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 names a specific verb ('Apply') and resource ('layer mask'), and the parenthetical '(merge)' clarifies that this is the destructive apply/merge operation rather than create, delete, or reveal. It clearly distinguishes itself from sibling tools like photoshop_create_layer_mask and photoshop_delete_layer_mask.

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

Usage Guidelines2/5

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

No guidance is given about when to use this tool versus alternatives, such as deleting a mask instead of applying it, or when a layer must already have a mask. The usage context is only weakly implied by the word 'merge'.

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