Skip to main content
Glama

Convert mask to shape layer

convert_mask_to_shape

Copies mask paths from a layer into a new shape layer with fill and path keyframes, with options to copy transform or parent to the source.

Instructions

Copy mask path(s) of a layer into a NEW shape layer (one group per mask with a fill, mask path keyframes included), placed above the source and aligned with it. alignment='copy' (default) copies the source's parent and transform values at the current time; 'parent' parents the shape layer to the source so it follows its animation; 'none' leaves the new layer at default transform. Mask modes/inversion/feather are not converted (reported as warnings).

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>"
    },
    "name": "convert_mask_to_shape"
  }
}

Input Schema

NameRequiredDescriptionDefault
compNoComposition name, 'Folder/Name' path, or item id. Omit to use the active composition.
fillNoFill color (default white; false/'none' = no fill).
nameNoNew layer name (default '<source> Mask Shapes').
layerYesLayer: 1-based index, layer name, or {id}/{index}/{name}. 'selected' = first selected layer.
masksNoMasks to convert (default all).
strokeNoOptional stroke color.
alignmentNoHow to align the new layer with the source (default copy).
removeMasksNoDelete the converted masks from the source layer afterwards.
strokeWidthNoStroke width px (default 2).
useMaskColorsNoFill each shape with its mask's UI color (when fill is not given).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnly=false, destructive=false, openWorld=false; the description adds real value beyond them by disclosing placement above the source, keyframe preservation, and that unsupported mask attributes are surfaced as warnings rather than silently dropped. It does not mention the side effect implied by removeMasks (deleting masks from the source) or anything about undo/response, so it stops short of full disclosure.

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?

Three tight sentences: core action and output structure first, then alignment options, then the explicit non-converted caveat. No filler and nothing important buried.

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 10-parameter mutation with no output schema, the description covers the essentials: what is created, how it is positioned, what alignment means, and what is not preserved. The remaining gap is the outcome/side effect of removeMasks and what the tool reports back, which the schema only partly covers.

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?

With 100% schema description coverage the baseline is 3, and the description exceeds it by giving behavioral meaning to the alignment enum and clarifying that fill defaults to white per mask group. It still leaves removeMasks and useMaskColors entirely to the schema.

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?

States a specific verb and resource ('Copy mask path(s) of a layer into a NEW shape layer') plus the resulting structure (one group per mask with a fill, keyframes included) and placement (above and aligned with the source). This is unambiguous and clearly distinct from shape-creation siblings such as create_shape_from_svg or text_to_shapes.

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?

Explains the practical choice among alignment modes ('copy' = snapshot of parent/transform at current time, 'parent' = follows source animation, 'none' = default transform) and declares the exclusions ('Mask modes/inversion/feather are not converted'). It lacks an explicit statement of when to prefer this tool over alternative shape-creation tools, but the operating context is clear.

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