Skip to main content
Glama

Import a Lottie/bodymovin JSON as a Rive scene fragment (art + timing + easing)

riv_lottie_import

Convert Lottie JSON animations into riv_create scene fragments, preserving keyframed timing, bezier easing, layer hierarchy, and gradients for direct splicing into your scene spec.

Instructions

Convert a Lottie (bodymovin, .json) animation — the format of LottieFiles' free animation library — into a riv_create scene fragment. Unlike riv_import_svg (shapes only), this keeps the keyframed timing: position, rotation, scale and opacity with their exact bezier easing (not mapped to a named preset), shape/null/precomp layer hierarchy, solid layers, gradient fills, stroke trim-path animation, and layer in/out visibility windows. Writes a scene-fragment JSON with {groups,shapes,animations} plus a rendered preview and a coverage/warnings summary. Since the fragment includes animations (which riv_create's "imports" mechanism does not merge), splice its groups/shapes/animations arrays directly into your riv_create scene spec instead of using "imports". Supported: shape layers (path/ellipse/rect/star/polygon/fill/stroke/gradient/trim/nested groups), null layers, solid layers, one level of precomp inlining, parented layers, hold and bezier easing. Not imported (counted in coverage.skipped, not silently dropped): text layers, masks, track mattes, repeaters, merge-paths, path/gradient-position keyframe morphing (frozen to first frame + warning), time-remapped precomps, expressions.

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": {
      "outSpec": "<outSpec>"
    },
    "name": "riv_lottie_import"
  }
}

Input Schema

NameRequiredDescriptionDefault
jsonNoInline Lottie JSON text (alternative to path)
pathNoPath to the Lottie .json file
outSpecYesOutput scene-fragment JSON path (e.g. anim.scene.json)
idPrefixNoPrefix for generated group/shape ids (avoid collisions)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.5.0

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations provided, the description carries the full behavioral burden and does so thoroughly: it discloses that the tool writes a scene-fragment JSON, a rendered preview, and a coverage/warnings summary; that skipped features are counted rather than silently dropped; and that some unsupported features are frozen with warnings.

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 front-loaded with the core purpose and remains information-dense, but it is a single long paragraph with several dense clauses. The supported/unsupported lists earn their place, though bullet-like structure would improve scanability.

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 complex import tool with no annotations and no output schema, the description is complete enough: it explains the output artifact, preview and warning side effects, supported and unsupported feature coverage, and how to consume the generated fragment.

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

Parameters3/5

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

Schema description coverage is 100%, so the input schema already documents all four parameters. The description does not add parameter-specific syntax or constraints beyond what the schema provides, making the baseline 3 appropriate.

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 precise verb and resource: convert a Lottie/bodymovin JSON animation into a riv_create scene fragment. It immediately distinguishes itself from riv_import_svg by noting that this tool preserves keyframed timing rather than importing shapes only.

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 contrasts this tool with riv_import_svg, explains that the resulting fragment must be spliced into a riv_create scene spec rather than used through 'imports', and lists unsupported Lottie features that will be skipped. This gives clear routing and usage context.

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