Skip to main content
Glama

Set mask path

set_mask_path

Replaces a mask's path with a rectangle, ellipse, or custom vertices, and optionally sets a Mask Path keyframe at a given time to animate the shape.

Instructions

Replace a mask's path with a rect/ellipse (position/size or bounds in layer pixels) or explicit vertices. With 'time' it sets a Mask Path keyframe (call at two times to animate).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "layer": "<layer>",
      "mask": "<mask>"
    },
    "name": "set_mask_path"
  }
}

Input Schema

NameRequiredDescriptionDefault
compNoComposition name, 'Folder/Name' path, or item id. Omit to use the active composition.
maskYesMask: 1-based index or mask name (e.g. 'Mask 1').
sizeNorect/ellipse [w,h] in layer pixels. Default: full layer size (shape/text layers: their content bounds).
timeNoSet a keyframe at this time.
typeNoMask shape (default rect, or path when vertices are given).
layerYesLayer: 1-based index, layer name, or {id}/{index}/{name}. 'selected' = first selected layer.
boundsNoAlternative to position/size: [left, top, width, height] in layer pixels.
closedNoClosed path (default true).
detailNoReturn the resulting vertices.
positionNorect/ellipse center in LAYER pixels (origin = layer top-left). Default: center of the layer.
verticesNoPath points [[x,y],...] (type 'path'). Coordinates relative to the group origin.
roundnessNorect corner radius px.
inTangentsNoIncoming bezier handles per vertex, RELATIVE to each vertex. Default all [0,0] (straight lines).
outTangentsNoOutgoing bezier handles per vertex, relative to each vertex. Default all [0,0].

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations only declare readOnlyHint=false and destructiveHint=false; the description adds substantive behavior the annotations cannot: coordinate space (layer pixels), default shape (rect), and that keyframing requires two calls. It does not mention whether the prior path is recoverable or how tangents/roundness interact with vertex mode, leaving a small gap for a replace-style mutation.

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?

Two tight sentences, front-loaded with the operation and its input modes, then the keyframe caveat. No filler and nothing repeated from the schema.

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 14-parameter mutation tool with no output schema, the description conveys the core decision structure (shape mode vs vertex mode vs keyframe mode) that an agent needs to call it correctly. Remaining gaps — tangents, roundness, detail — are documented in the schema.

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 already 100%, so the baseline is 3; the description earns above that by explaining the position/size vs bounds alternative and by clarifying that 'time' writes a Mask Path keyframe rather than just selecting a time. It stops short of addressing detail, closed, or tangent arrays, but those are covered in-schema.

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

Purpose4/5

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

States a specific verb and resource ('Replace a mask's path') plus the accepted input modes (rect/ellipse via position/size or bounds, or explicit vertices). The word 'mask' implicitly separates it from set_shape_path and set_text_path, though neither sibling is named.

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?

Gives one concrete usage pattern — 'call at two times to animate' a Mask Path keyframe — which is genuinely useful. It offers no guidance on when to prefer this over add_mask, set_mask_properties, or convert_mask_to_shape, so routing between siblings 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.

Deploy Server

Other Tools