Skip to main content
Glama

tween_cels

Animate a layer's cels across frames by interpolating position, opacity, or scale from start to end, with easing and optional looping.

Instructions

Animate a layer's cels from start to end across the frames, in frame order.

position: start/end are {x, y} absolute cel positions (top-left of the cel image in sprite coordinates). opacity: numbers 0..255. scale: a factor, or {x, y} factors, 0.05..16 of the source_frame cel, resized nearest-neighbour around the anchor and written as a new cel in every frame (created where missing). position and opacity need a cel in every frame. Values round to the nearest integer, halves away from zero. Needs at least 2 frames; frame i of n gets t = i/(n-1), or i/n with loop. easing: ease_in t², ease_out 1-(1-t)², ease_in_out quadratic in/out, ease_out_back overshoots past end then settles, bounce bounces into end. The layer must not be locked.

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": {
      "path": "<path>",
      "layer": "<layer>",
      "frames": "<frames>",
      "property": "<property>",
      "start": "<start>",
      "end": "<end>"
    },
    "name": "tween_cels"
  }
}

Input Schema

NameRequiredDescriptionDefault
endYesposition: {x, y} cel position; opacity: 0..255; scale: a factor or {x, y} factors, 0.05..16
loopNoStop one step before end so a looping animation stays smooth
pathYesSprite file. Relative paths resolve against the server root.
layerYesLayer name, or a 'group/child' path for nested layers
startYesposition: {x, y} cel position; opacity: 0..255; scale: a factor or {x, y} factors, 0.05..16
anchorNoscale only: point of the cel that stays in placecenter
easingNoHow the value moves from start to endlinear
framesYesFrames: a number, "1-4", "1-4,7" or "all" (1-based)
propertyYesWhat to animate
source_frameNoscale only: frame whose cel is scaled; default first frame

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so well: it discloses the write side effect (scale writes a new cel in every frame, created where missing), the locked-layer requirement, the per-property cel preconditions, and the exact interpolation and rounding rules including halves-away-from-zero. This is substantially more than a restatement of the tool name.

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 purpose leads, followed by labeled constraints (position, opacity, scale, frames, easing) in a compact block. Some ranges duplicate the schema, but every sentence conveys a constraint or a formula an agent would otherwise have to guess.

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 tool with no annotations, the description covers prerequisites, side effects, and interpolation math, and an output schema exists so return values need no explanation. It does not say what happens when the frame count is below 2 or whether existing cel content is overwritten, which are the remaining gaps.

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%, so the baseline is 3, but the description adds real meaning on top: it explains that loop shifts the step to i/n so the last frame lands one short of end, and it defines each easing curve (ease_in t², ease_out_back overshoot, bounce) in concrete terms. The anchor and source_frame semantics are only lightly echoed, keeping it from a 5.

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 opening sentence names a specific verb and resource: animating a layer's cels from start to end across frames in frame order. An agent can distinguish this from clear_cels, but the near-sibling oscillate_cels is never mentioned, so the boundary between the two animation tools is left to inference.

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?

The description gives hard preconditions rather than when-to-use guidance: at least 2 frames required, the layer must not be locked, position and opacity need a cel in every frame while scale creates missing cels. These are useful gates, but nothing states when this tool should be chosen over oscillate_cels or other frame-motion tools.

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