Skip to main content
Glama

set-layer-mask

Create or modify a mask on a layer using a rectangle or vertex path. Define shape, mode, feather, opacity, and expansion.

Instructions

Create or modify a mask on a layer. Provide the shape as maskRect (rectangle shorthand) OR maskPath (array of [x,y] vertices, >= 3). Omit maskIndex to add a new mask, or pass it to modify an existing one.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
compNameNoComposition name (or active comp if omitted).
maskModeNoMask mode (default: 'add').
maskNameNoOptional mask name.
maskPathNoArray of [x,y] vertices defining the mask shape (>= 3 points).
maskRectNoRectangle shorthand {top,left,width,height} in layer pixels.
compIndexNo1-based comp index, if compName is omitted.
layerNameNoLayer name (alternative to layerIndex).
maskIndexNo1-based index of an existing mask to modify. Omit to create a new mask.
layerIndexNo1-based layer index.
maskFeatherNoFeather [x,y] in pixels.
maskOpacityNoMask opacity 0-100.
maskExpansionNoMask expansion in pixels.
Behavior3/5

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

With no annotations, the description carries the full burden. It discloses the two shape input modes and the create/modify behavior, but does not mention what happens if both maskRect and maskPath are provided, or any other side effects.

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?

A single sentence that front-loads the purpose and concisely packs shape options and modification semantics with zero waste.

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

Completeness4/5

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

Given 12 parameters, no output schema, and no annotations, the description adequately covers the core logic of shape specification and modification. It lacks some edge case behavior but is sufficient for an agent to use the tool correctly.

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

Parameters4/5

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

Schema coverage is 100%, so baseline is 3. The description adds value by clarifying that maskRect and maskPath are alternatives and that maskIndex controls create vs modify, going beyond the schema's individual property descriptions.

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 clearly states the verb 'Create or modify' and the resource 'a mask on a layer', distinguishing it from sibling tools which focus on effects, markers, or other layer properties.

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?

Provides explicit guidelines on using maskRect vs maskPath, and the role of maskIndex for new vs modify. No explicit 'when not to use' is needed as no alternative mask tool exists among siblings.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/a-y-ibrahim/after-effects-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server