Skip to main content
Glama

Render a single frame to PNG

riv_render_frame

Renders one frame from a .riv animation or state machine to PNG, returns it inline, and saves it to disk. Specify path, time, size, artboard, animation, or state machine.

Instructions

Render one frame of a .riv animation or state machine to PNG. Returns the image inline and saves it to disk.

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_frame"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesPath to the .riv file
timeNoSeconds to advance before capturing (default 0)
widthNoOutput width in px (default: artboard width)
heightNoOutput height in px (default: keeps the artboard aspect ratio)
outPathNoOutput PNG path (default: alongside the .riv)
artboardNoArtboard name (default: first)
animationNoLinear animation name
backgroundNoCSS background color (default: transparent)
stateMachineNoState machine name (takes precedence)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.8.0
    • addedInput schema / properties / height / description
      Added value: +"Output height in px (default: keeps the artboard aspect ratio)"
    • addedInput schema / properties / width / description
      Added value: +"Output width in px (default: artboard width)"
  2. First observedv0.5.0

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden. It does disclose the useful dual behavior of returning the image inline AND writing a file to disk, which is real value beyond the schema. However, it omits whether an existing file at outPath is overwritten, what happens on invalid animation/stateMachine names, and any permission or side-effect warnings for a tool that writes to disk.

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?

Two sentences, zero waste, with the core action front-loaded and the output behavior summarized second. Nothing is padded or repeated from the title.

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

Completeness4/5

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

For a nine-parameter tool with full schema coverage and no output schema, the description covers what the tool produces (inline image plus file on disk), which is the main gap an output schema would otherwise fill. Overwrite/error semantics are the remaining omission, keeping it short of a 5.

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 every one of the nine parameters is already documented with defaults and constraints; baseline 3 applies. The description adds only the passing mention of 'animation or state machine' and no detail on time, artboard, background, or the stateMachine-over-animation precedence that the schema encodes.

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 — render one frame of a .riv animation or state machine to PNG. The 'one frame' qualifier implicitly separates it from the sibling renderers (riv_render_gif, riv_render_apng, riv_render_video, riv_render_sprites, riv_batch_render), though no sibling is named explicitly.

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?

Usage is implied by 'one frame' versus the animated-format siblings, but the description never states when to prefer this over riv_render_gif or riv_render_sprites, nor any prerequisites such as the .riv file needing to exist. The agent must infer the choice from sibling names alone.

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