Skip to main content
Glama

repair_animation

Fixes animation structure by ensuring missing layers, setting layer order, and handling cels outside frame ranges, validating all changes before saving.

Instructions

Fix the structure of an animation; everything is checked before anything changes.

ensure_layers adds missing layers as empty image layers on top of their parent. layer_order puts the listed layers (all in the same group, or all top level) in that order, bottom first, in the stack slots they already hold; unlisted layers stay put. layer_frame_ranges finds layers with pixels in frames (within frames) outside their range (it may name a layer ensure_layers creates, by path or bare name); out_of_range decides what happens to them: "report" only lists them and changes nothing, "hide" makes each such layer invisible (its cels stay), "delete" deletes the out-of-range cels. Locked layers are refused for hide, delete and moves. changed is false when nothing needed fixing; the file is then not rewritten. When any step fails, nothing is saved.

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

Input Schema

NameRequiredDescriptionDefault
pathYesSprite file. Relative paths resolve against the server root.
framesNoFrames: a number, "1-4", "1-4,7" or "all" (1-based)all
layer_orderNoSibling layers in the wanted order, bottom first
out_of_rangeNoWhat to do with cels outside a layer's frame rangereport
ensure_layersNoLayers to create when missing; 'group/name' creates it in that group
layer_frame_rangesNoLayer name or path -> the frames it may have pixels in, e.g. {"Sword": "3-5"}; a group covers all its layers

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior5/5

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

With no annotations supplied, the description carries the full behavioral burden and does so: all validation happens before any mutation, a failed step means nothing is saved, and an unchanged file is not rewritten. It also discloses that locked layers are refused for hide, delete and moves, which is exactly the kind of constraint an agent cannot infer from schema.

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?

Purpose and the safety invariant are front-loaded, then each parameter leads its own clause, which makes it scannable. It is dense and runs long, but essentially every sentence carries behavioral information rather than filler.

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?

For a 6-parameter mutation tool with an output schema, it covers all parameters, ordering semantics, failure atomicity, and the no-op case. An agent has everything needed to call it correctly and to predict the outcome.

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 genuine meaning beyond the schema: layer_order must be all in one group or all top level, unlisted layers stay in place, ensure_layers creates empty image layers on top of their parent, and layer_frame_ranges group keys cover all their layers. These are non-obvious semantics an agent could not read off the JSON 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?

States a specific verb and resource ('Fix the structure of an animation') plus the key invariant that checking precedes mutation. It does not explicitly distinguish itself from the sibling check_animation, though the 'report' mode partially implies the read-only alternative.

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

Usage Guidelines4/5

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

Explains when each capability applies and that out_of_range='report' changes nothing, which effectively tells an agent how to do a dry run. It never names check_animation as the inspection-only alternative or states prerequisites for a repair pass.

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