Skip to main content
Glama

Add loop expression

add_loop

Loop a property's keyframes using cycle, pingpong, offset, or continue expressions, choosing out, in, or both directions and limiting by keyframe count or duration.

Instructions

Loop a property's keyframes with loopOut/loopIn: type cycle (default), pingpong, offset, continue. direction out (after the last key, default), in (before the first), in_out (both). numKeyframes limits the loop to the last/first N keys (0 = all); duration uses loopOutDuration/loopInDuration instead.

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

Input Schema

NameRequiredDescriptionDefault
compNoComposition name, 'Folder/Name' path, or item id. Omit to use the active composition.
typeNo
layerYesLayer: 1-based index, layer name, or {id}/{index}/{name}. 'selected' = first selected layer.
durationNoLoop this many seconds instead of keyframes.
propertyYesProperty path, '/'-separated, by display name, matchName or 1-based index. Shortcuts: 'Position', 'Scale', 'Rotation', 'Opacity', 'Anchor Point', 'Source Text', 'Time Remap', 'Audio Levels'. Examples: 'Transform/Position', 'Effects/Gaussian Blur/Blurriness', 'Contents/Rectangle 1/Fill 1/Color', 'Masks/Mask 1/Mask Feather'.
directionNo
numKeyframesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false and destructiveHint=false, so the agent knows this writes to the project. The description adds real domain context about the generated expression (loopOut/loopIn variants and their parameters), but omits whether an existing expression on the property is overwritten, whether the change is reversible/undoable, and what happens if the property has no keyframes.

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?

A single front-loaded sentence leads with the action and then layers the option semantics, so a reader can stop after the first clause. It is dense with parentheticals but contains no filler or repetition.

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 7-parameter mutation tool with no output schema and minimal annotations, the description covers the expression-behavior parameters well but leaves the interaction with existing expressions and failure modes unaddressed. Those gaps matter for an agent deciding whether it is safe to call on an already-expressed property.

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 57% schema coverage, the description meaningfully compensates: it supplies defaults the schema lacks ('cycle (default)', 'out... default'), explains what direction actually means in terms of key positions, and documents numKeyframes semantics ('last/first N keys, 0 = all') which has no schema description at all. Only comp, layer, and property are left to the 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?

The description opens with a specific verb and resource: 'Loop a property's keyframes with loopOut/loopIn', naming the underlying expression construct so an agent knows exactly what gets written. It is clear against generic siblings like set_expression, but it never explicitly contrasts itself with add_wiggle or set_expression.

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?

Usage is implied rather than stated: the type/direction/numKeyframes/duration options convey how to configure a loop, and 'duration uses loopOutDuration/loopInDuration instead' hints that duration is an alternative mode to numKeyframes. There is no explicit when-to-use versus when-not guidance or a pointer to a sibling for related needs.

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