Skip to main content
Glama

set-layer-mask

Create or modify After Effects layer masks by defining a rectangle or polygon path, then adjust mask 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 must carry the transparency burden. It discloses key behavior (create vs. modify, two shape input methods), but it does not explain what happens if both maskRect and maskPath are provided, nor does it mention error cases, coordinate assumptions, or side effects. This is acceptable but not rich.

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 exactly two sentences, front-loaded with the primary purpose and following with essential usage. Every clause is informative, with no fluff or repetition of schema content. It is an model of concision.

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?

For a tool with 12 parameters and no output schema, the description covers the central choices (shape type, add/modify) but omits mention of property parameters like maskOpacity, maskFeather, and maskExpansion, which are left to the schema. It also doesn't address edge cases or return behavior. Still, the essential usage is well-covered, so it's adequate but not exhaustive.

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%, establishing a baseline of 3. The description adds value by clarifying the OR relationship between maskRect and maskPath, a semantic not fully captured in the individual parameter descriptions. It also reinforces the maskIndex add/modify behavior, though this is already present in the schema. Overall, it provides a modest increment beyond structured definitions.

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 tool's function: 'Create or modify a mask on a layer.' It names the specific resource (mask on a layer) and the actions (create/modify), which distinguishes it from sibling tools like setLayerKeyframe or setLayerExpression. The verb+resource combination is unambiguous.

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 actionable usage: 'Provide the shape as maskRect ... OR maskPath' and explains the distinction between adding and modifying via maskIndex. It does not explicitly mention when not to use this tool or name alternatives, but the context is clear for a mask-specific operation. This falls short of a 5 because it lacks explicit exclusionary guidance.

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/omar-hesham/after-effect-mcp-with-claude'

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