Skip to main content
Glama

Render an animation to GIF

riv_render_gif

Render .riv animations or state machine playback to animated GIF previews with configurable FPS, size, duration, and background for quick visual review.

Instructions

Render a .riv animation (or state machine idle playback) to an animated GIF file for preview.

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": "riv_render_gif"
  }
}

Input Schema

NameRequiredDescriptionDefault
fpsNoFrames per second (default 20)
pathYesPath to the .riv file
widthNoOutput width in px (default 480)
outPathNoOutput GIF path (default: alongside the .riv)
artboardNoArtboard name (default: first artboard)
durationNoSeconds to render (default 2)
animationNoAnimation name (default: first state machine or animation)
backgroundNoCSS background color (default white — GIF has no alpha)
stateMachineNoState machine name (takes precedence over animation)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.8.0
    • addedInput schema / properties / artboard / description
      Added value: +"Artboard name (default: first artboard)"
    • addedInput schema / properties / stateMachine / description
      Added value: +"State machine name (takes precedence over animation)"
    • changedInput schema / properties / width / description
      Previous value: -"Output width (default: artboard width, capped 800)"New value: +"Output width in px (default 480)"
  2. First observedv0.5.0

TDQS

B3.1/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full behavioral burden, and it discloses very little. It never states that rendering writes a file to disk, whether an existing outPath is overwritten, how long the render blocks, or what happens when the named artboard/animation is missing. The only real behavioral hint is "for preview."

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?

A single front-loaded sentence with no filler and the key resource and output format stated first. It is efficient, though the terseness is part of why behavioral context is thin.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

This is a 9-parameter rendering tool with no annotations and no output schema, so the description must explain the result of the call. It says nothing about whether the tool returns the written GIF path, whether output is silent, or how errors for invalid artboard/animation names surface, leaving a real gap for a file-producing tool.

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% with per-parameter defaults and bounds, so the schema already does the explanatory work. The description adds only the notion of "state machine idle playback," which loosely maps to the stateMachine/animation parameters, so baseline 3 applies.

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 names a specific verb (render) and precise input/output (a .riv animation or state-machine playback to an animated GIF). It is clear on its own, but it never distinguishes itself from near siblings such as riv_render_apng, riv_render_video, or riv_render_frame, so an agent must infer the choice from names alone.

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?

"For preview" implies a lightweight, quick-look use case, which is a genuine usage signal. However, there is no explicit when-to-use/when-not, and no routing to GIF vs APNG vs video vs single-frame rendering, which is exactly the decision an agent faces with this sibling set.

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