Skip to main content
Glama

Render an animation to a sprite sheet PNG

riv_render_sprites

Generate a sprite sheet PNG from a Rive animation, capturing evenly spaced frames and JSON metadata for web or game integration.

Instructions

Render N evenly-spaced frames of a .riv animation/state machine into a single grid sprite sheet PNG (columns = ceil(sqrt(N))). Writes the PNG plus a JSON metadata file (cellW/cellH/cols/rows/count/fps) alongside.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fpsNoMetadata playback fps (default: count/duration)
outNoOutput PNG path (default: alongside the .riv); metadata is written next to it with a .json extension
pathYesPath to the .riv file
countNoNumber of frames (default 16)
widthNo
heightNo
artboardNo
durationNoSeconds spanned by the frames (default: one animation loop, or 2s)
animationNo
backgroundNo
stateMachineNo
Behavior4/5

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

With no annotations present, the description carries the full burden of behavioral disclosure. It clearly discloses that the tool writes both a PNG and a JSON metadata file alongside, and reveals the grid layout formula (columns = ceil(sqrt(N))). This adds useful context beyond the schema. However, it does not mention overwrite behavior, file permission requirements, or potential long runtime for large frame counts.

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

Conciseness5/5

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

The description is two sentences long and is front-loaded with the core purpose. It avoids unnecessary jargon and includes only the key details (frame spacing, grid layout, output artifacts). Every sentence earns its place, making it concise and well-structured.

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?

The description gives a good high-level overview but omits important interaction details: how fps, duration, and count interrelate, which parameter takes precedence when both animation and stateMachine are provided, and the effect of width/height on rendering. Since there is no output schema and many parameters are semantically sparse, the description is not fully complete for a tool with 11 parameters.

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 45%, so the description must compensate. It adds meaning for the 'count' parameter (N frames) and the metadata fields (cellW/cellH/cols/rows/count/fps), clarifying how these relate to the output. However, many parameters such as width, height, artboard, animation, stateMachine, and background are not addressed, leaving gaps for the agent. The description only partially compensates for the low schema coverage.

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 clearly states the tool's function: 'Render N evenly-spaced frames of a .riv animation/state machine into a single grid sprite sheet PNG'. It specifies the verb (Render), the resource (.riv animation/state machine), and the output format (single grid sprite sheet PNG), which effectively distinguishes it from sibling tools like riv_render_frame, riv_render_gif, and riv_render_video. The output metadata file is also briefly described.

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?

The description implies the use case (sprite sheet creation) but does not explicitly state when to use this tool versus alternatives. There is no mention of 'use this instead of...' or 'not recommended when...'. Sibling tools such as riv_render_gif and riv_render_video are not referenced, leaving the agent to infer the distinction based solely on the output type.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ODU33104/rive-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server