Skip to main content
Glama

set_mask

Add or edit a layer mask using a rectangle, ellipse, image, or painted strokes; invert, feather, or hide all to control layer visibility.

Instructions

Layer mask (white = visible). kind rect/ellipse with box=[x,y,w,h] in document px, image with path (grayscale or alpha file, aligned to the layer content), or paint (to paint with mask_stroke; hide_all=true starts fully hidden). feather = soft edge px.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
boxNo
kindNorect
pathNo
layerYes
invertNo
densityNo
featherNo
projectNo
hide_allNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.1/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden, and it does disclose real traits: white = visible mask semantics, the document-px coordinate space, image path alignment, and hide_all initialization. It stops short of saying whether an existing mask is replaced, what permissions are required, or how density interacts with the result.

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 mask semantics are front-loaded before the mode enumeration, and nearly every clause carries a format, unit, or behavioral detail rather than filler. It reads as one dense run-on string, but no sentence is wasted.

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

Completeness3/5

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

For a 9-parameter mutation tool with no annotations, no output schema, and 0% schema coverage, the description covers the primary modes well but leaves invert/density and the set-vs-update-vs-remove relationship unexplained. Adequate as a minimum viable definition, not complete.

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 coverage is 0%, so the description must compensate and it partially does: it defines the kind modes, the box=[x,y,w,h] document-px format, the path requirements (grayscale/alpha, aligned to content), the feather unit (px), and hide_all semantics. Four of nine parameters — layer, project, invert, and density — get no explanation, and density in particular is non-obvious.

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

Purpose3/5

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

The description centers on "Layer mask (white = visible)" and enumerates the mask kinds (rect/ellipse/image/paint), so an agent can infer this configures a layer mask. However, the action verb is never stated and there is no differentiation from the tightly related siblings update_mask, remove_mask and mask_stroke, leaving the exact purpose only implied.

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

Usage Guidelines3/5

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

It gives mode-level guidance — paint is paired with mask_stroke, hide_all=true starts fully hidden — which is useful conditional context. But it never states when to choose set_mask over update_mask or remove_mask, so the core when-to-use decision is left to inference.

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