Skip to main content
Glama

Set layer transition

set_layer_transition
Destructive

Set how a layer ENTERS at the start of its on-timeline window and LEAVES at the end, instead of popping. The transition is EDGE-RELATIVE — only a length and a look are stored — so it rides the edge through every later trim, slide or clip retime. Prefer this over fade_layer / apply_preset whenever the intent is 'enters and leaves nicely': those write opacity keyframes at ABSOLUTE frames, which strand themselves the moment the edge moves, and clutter the timeline lanes. A layer created WITH a block is born carrying a short fade at each edge — whether you passed the block or the editor minted one — so check inspect_layers before adding one, rather than assuming there is none. Layers created before this default existed, and any edge cleared to "cut", carry nothing and do need setting. A layer with NO block is always-present, has no edges, and a transition on it is inert. Video clips default to a hard cut, because a hard cut between shots is the grammar of short-form video. kind "cut" clears the edge back to a hard cut. The length is a request: when the window is too short to hold both ramps they are squeezed proportionally at render time, and the stored values are left intact.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
edgeYesWhich edge to set. "in" is the start of the layer's window, "out" the end.
kindYesThe look. "cut" = hard edge (clears any transition). "fade" = opacity ramp. "slide" = travels in/out from a direction while fading. "pop" = scales up from 80% with an overshoot.
curveNoOptional easing override (linear, easeIn, easeOut, easeInOut, outQuart, outExpo, outBack, inBack, inOutBack). Defaults suit the kind: entries decelerate in, exits accelerate away.
framesNoRamp length in frames (30 fps). Default 6. Ignored for kind "cut".
directionNoFor kind "slide" only. On the IN edge this is where the layer comes FROM; on the OUT edge, where it goes TO. Default "left".
elementIdYesElement id of the layer (image.<id>, video.<id>, text.<id>, shapes.<id>, or group.<id>).
projectIdYesOpaque project id (a v4 UUID, from list_projects/create_project). Selects which existing project this call mutates.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYesWhether the call succeeded.
dataNoThe payload, shaped by the tool.
noteNoWhat to do next when not ready.
errorNoWhy it failed.
statusNoFor cache-backed readers: whether the answer was ready.
editorUrlNoOpens this project in the editor.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • removedInput schema / properties / anonymousToken
      Removed value: -{
      -  "description": "The token create_anonymous_account returned. This connection has no Morpha key, so every call carries it.",
      -  "type": "string"
      -}
    • changedInput schema / required
      Previous value: -[
      -  "elementId",
      -  "edge",
      -  "kind",
      -  "projectId",
      -  "anonymousToken"
      -]New value: +[
      +  "elementId",
      +  "edge",
      +  "kind",
      +  "projectId"
      +]
  2. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "description": "The result envelope every Morpha tool returns.",
      +  "properties": {
      +    "data": {
      +      "description": "The payload, shaped by the tool.",
      +      "type": [
      +        "object",
      +        "array",
      +        "string",
      +        "number",
      +        "boolean",
      +        "null"
      +      ]
      +    },
      +    "editorUrl": {
      +      "description": "Opens this project in the editor.",
      +      "type": "string"
      +    },
      +    "error": {
      +      "description": "Why it failed.",
      +      "type": "string"
      +    },
      +    "note": {
      +      "description": "What to do next when not ready.",
      +      "type": "string"
      +    },
      +    "ok": {
      +      "description": "Whether the call succeeded.",
      +      "type": "boolean"
      +    },
      +    "status": {
      +      "description": "For cache-backed readers: whether the answer was ready.",
      +      "enum": [
      +        "ready",
      +        "not-ready"
      +      ],
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "ok"
      +  ],
      +  "type": "object"
      +}
  3. Changed2 schema fields changed
    • addedInput schema / properties / anonymousToken
      Added value: +{
      +  "description": "The token create_anonymous_account returned. This connection has no Morpha key, so every call carries it.",
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "elementId",
      -  "edge",
      -  "kind",
      -  "projectId"
      -]New value: +[
      +  "elementId",
      +  "edge",
      +  "kind",
      +  "projectId",
      +  "anonymousToken"
      +]
  4. First observed

TDQS

A4.9/5.0
Behavior5/5

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

The description goes far beyond the annotations: it discloses edge-relative storage that survives trim/slide/retime, the fact that layers created with a block already carry a short fade, that kind "cut" clears the edge, and that lengths are a request that may be squeezed at render time. These are important behavioral traits that annotations do not and cannot express.

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?

The description is long but information-dense, and the core action is front-loaded. Every sentence conveys a distinct behavioral or usage fact. It is slightly repetitive around the phrase 'hard cut', but overall the length is justified by the tool's nuanced state handling.

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

Completeness5/5

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

Given the tool's complexityness: it handles 7 parameters, pre-existing state, edge cases, default behaviors, rendering-time adaptation, and interactions with sibling tools. The description covers all of this and no crucial calling context is missing. The output schema also covers return-value expectations, so the description does not need to explain those.

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

Parameters5/5

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

Schema coverage is 100%, so the baseline is 3, but the description adds meaning that is not in the schema: the length is a request and may be squeezed proportionally, values remain intact after squeezing, kind "cut" clears the edge, and default curve behavior decelerates entries and accelerates exits. This is substantial value beyond the structured parameter 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 starts with a specific verb and resource: 'Set how a layer ENTERS at the start of its on-timeline window and LEAVES at the end.' It also names the closest siblings (fade_layer, apply_preset) and distinguishes this tool's edge-relative behavior from their absolute-keyframe behavior, so an agent can clearly tell it apart.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It explicitly says 'Prefer this over fade_layer / apply_preset whenever the intent is enters and leaves nicely' and explains why the alternatives strand keyframes. It also gives concrete pre-use guidance: check inspect_layers before adding a transition, layers with no blocks are inert, and video clips default to a hard cut. This is clear when-to-use and when-not-to-use guidance with named alternatives.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources