Skip to main content
Glama

validate_loop

Read-only

Measure animation frames without playback to find identical frames, uneven spacing, and loop wrap faults, returning a validation manifest with errors and warnings.

Instructions

Measure an animation and report what is wrong with it, without playing it.

Renders each frame once (one Aseprite launch), then reports per-frame hashes, content
bounding boxes, centroids, the bottom row of the drawn content, the spacing series
between frames, and the durations. On top of the numbers it checks for: a last frame
identical to the first (a loop's wrap showing one image twice), identical adjacent
frames (a pose held by repeating a frame instead of lengthening one), uniform frame
durations, a spacing series that wobbles rather than eases, a contact edge that moves,
and frames with nothing drawn on them.

Args:
    tag: Limit the check to one animation tag's frames. Its repeat setting also
        decides whether the seam is treated as a loop's wrap.
    layer: Measure one layer's cels instead of the flattened frame, so a moving
        character can be measured without the background it sits on.
    loops: Override whether these frames are a cycle. One-shots (attack, hurt, death)
        do not wrap, so a repeated last frame is only a warning for them.
    jitter_tolerance: Pixels of spacing wobble to ignore. Integer cel positions make
        1px unavoidable, so that is the default; pass 0 to see every reversal.

Returns a ``workflow_manifest.v1`` manifest (kind "validation") whose `validation`
section is `{passed, checks[], errors[], warnings[]}` and whose `animation` section
carries every measurement. `validation.passed` is the verdict and is false only for
faults that are wrong whatever the animation is doing; the rest are warnings, because
a bouncing ball is meant to leave the ground and a flicker is meant to go blank.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tagNo
layerNo
loopsNo
filenameYes
jitter_toleranceNoDefault: 1.0.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.10.0

TDQS

A4.4/5.0
Behavior5/5

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

Annotations only declare readOnlyHint and openWorldHint=false, but the description adds substantial behavioral detail: it renders each frame once via a single Aseprite launch, enumerates the measurement series produced, and critically explains the pass/warning verdict semantics ('passed is false only for faults that are wrong whatever the animation is doing'). This is exactly the context annotations cannot carry.

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?

It is front-loaded with the purpose and cleanly sectioned into behavior, Args, and Returns. The prose is dense but each sentence (measurements listed, checks listed, verdict rule) earns its place; a slight trim of the enumeration would tighten it further.

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?

There is no output schema, so the description compensates by specifying the returned workflow_manifest.v1 shape and its validation.animation/validation sections in detail. Combined with the arg semantics and check list, an agent has everything needed to call and interpret the tool.

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 only 20% schema coverage, the description does the heavy lifting: tag (frame subset plus seam semantics), layer (isolate cels from background), loops (cycle override), and jitter_tolerance (1px default rationale) all get meaningful explanation beyond the schema. Only filename is left implicit, but it is self-evident.

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 states a specific verb and resource ('Measure an animation and report what is wrong with it, without playing it') and enumerates the concrete faults it detects (duplicate last frame, held frames, uniform durations, wobbling spacing, moving contact edge, empty frames). This distinguishes it clearly from generic siblings like validate_asset_spec or assess_sprite without needing to open any schema.

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?

It gives clear context for the args (when to pass a tag, when to measure a layer, when loops should be overridden) and notes that one-shot animations turn some faults into warnings. However, it never names an alternative tool or states explicit when-not-to-use conditions relative to the many other validate_/assess_ siblings, so usage is implied rather than routed.

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