Skip to main content
Glama

stagger_layers

Offset layer start times in staggered waves from a chosen origin so grids cascade in rings. Set the per-step interval, ease, and seed for controlled, repeatable spreads.

Instructions

Start several elements one after another, the way Anime.js stagger() does: each layer's first motion preset starts at at plus each seconds per step of distance from where the wave starts (from: first, last, center, edges, random, a layer index, or [x, y] as fractions of the group's box). Distance is measured on the frame, so a grid of cards waves out in rings from the centre; ease (a named curve, "in(2)", "out(3)") bends the spread, seed fixes random. Returns each layer's new start (whole frames). Layers the wave starts together (mirrored cards) get allow.together, so motion/stagger knows it is meant.

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": {
      "composition": "<composition>",
      "layers": "<layers>",
      "each": "<each>"
    },
    "name": "stagger_layers"
  }
}

Input Schema

NameRequiredDescriptionDefault
atNoSeconds from the start of the composition the first element is in that the wave starts (default: the earliest start now)
eachYesSeconds per step
easeNoA named curve that bends the spread
fromNo
seedNo
basisNoWhat you read and followed to make this change, as refs from search or lookup: rule:<lint or taste rule>, taste, feedback:<id> (earlier feedback this follows; what it answers goes in feedback), commit:<id> (an earlier change it builds on), asset:, template:, skill:… The person sees them under the change, so they know why it is this way. Name only what shaped it.
layersYesElement ids, in order (first and last follow it)
messageNoOne line saying why, kept with the change in the history
feedbackNoIds of the feedback this change answers (notes and marks from list_notes, list_examples or the conversation). When the person keeps the change it joins the record of that feedback, and when they then mark the feedback resolved it is the fix; when they take it back, the feedback opens again.
confidenceNoHow sure you are this change is what the person wants. high: they asked for exactly this, or you measured it against a reference. medium: you inferred it from the taste, a rule or earlier feedback. low: you are guessing, or it changes something they did not ask about. The person's threshold decides which changes stand by themselves and which wait for them to keep; say it honestly on every change.
compositionYesComposition name (file in compositions/ without .json)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv0.1.2
    • changedInput schema / properties / at / description
      Previous value: -"Seconds from the scene start the first layer starts (default: the earliest start now)"New value: +"Seconds from the start of the composition the first element is in that the wave starts (default: the earliest start now)"
    • addedInput schema / properties / confidence
      Added value: +{
      +  "description": "How sure you are this change is what the person wants. high: they asked for exactly this, or you measured it against a reference. medium: you inferred it from the taste, a rule or earlier feedback. low: you are guessing, or it changes something they did not ask about. The person's threshold decides which changes stand by themselves and which wait for them to keep; say it honestly on every change.",
      +  "enum": [
      +    "high",
      +    "medium",
      +    "low"
      +  ]
      +}
    • changedInput schema / properties / layers / description
      Previous value: -"Layer ids, in order (first and last follow it)"New value: +"Element ids, in order (first and last follow it)"
    • removedInput schema / properties / scene
      Removed value: -{
      -  "type": "string"
      -}
    • changedInput schema / required
      Previous value: -[
      -  "composition",
      -  "scene",
      -  "layers",
      -  "each"
      -]New value: +[
      +  "composition",
      +  "layers",
      +  "each"
      +]
  2. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/5

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

Annotations declare readOnlyHint=false, destructiveHint=false, idempotentHint=false, so the safety profile is already supplied. The description adds genuine context by stating what is returned (each layer's new start, in whole frames) and how distance/ease/seed interact, but it never says that existing start times are overwritten or whether the change is reversible — the key behavioral fact for a mutation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The first sentence is packed but front-loads the core mechanic, and subsequent clauses each carry information. However, the closing sentence about 'allow.together' references a concept that appears nowhere in the schema, which reads as extraneous and confusing rather than clarifying.

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 an 11-parameter mutation tool with no output schema, the description does explain the return value and the core spatial mechanics. It leaves unaddressed whether existing start times are replaced, whether redistributing starts can be undone, and why the governance fields (basis, message, confidence, feedback) should be supplied — though those fields are well documented in the schema itself.

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 82% schema coverage the baseline is 3, and the description earns above that by explaining how `at` and `each` compose ('at plus each seconds per step of distance'), what `from` accepts including layer indexes and [x, y] fractions, how distance is measured on the frame, and what `ease` and `seed` do. This adds conceptual meaning beyond the field-level comments.

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 states a specific action and resource: starting several elements' first motion presets in a staggered wave, explicitly modeled on Anime.js stagger(). It is clearly not layers_at or motion, though it never names a sibling as the alternative, relying instead on the aside that motion/stagger 'knows it is meant'.

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 through the wave metaphor and the note about mirrored cards, but there is no explicit when-to-use/when-not guidance versus motion or layers_at. An agent can infer this is the choice for offsetting multiple layers, but must guess at the boundary.

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