Skip to main content
Glama

Batch-render many .riv files/formats in one call

riv_batch_render

Render multiple Rive files in batch to PNG, GIF, APNG, WebM, or sprites, sequentially reusing one headless Chromium page. Per-job success/error report included for CI/scripts.

Instructions

Render a list of jobs — each a single .riv (rivPath) or a glob of .riv files (glob) — to png/gif/apng/webm/sprites, sequentially reusing the same headless Chromium page (no parallel pages). Built for CI/scripts: call this tool repeatedly from your pipeline instead of expecting a live watch mode — none is provided, since MCP's request/response model doesn't fit a background file watcher. 'defaults' holds options shared across every job; each job's own fields override them. One job's failure does not stop the batch — every job (and every file a glob expands to) gets its own success/error/outPath/durationMs entry in the returned report.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
jobsYesJobs to render, in order
defaultsNoShared defaults merged under each job (job-level values win)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed48 schema fields changedv0.6.1
    • removedInput schema / properties / defaults / properties / animation / $ref
      Removed value: -"#/properties/jobs/items/properties/animation"
    • addedInput schema / properties / defaults / properties / animation / type
      Added value: +"string"
    • removedInput schema / properties / defaults / properties / artboard / $ref
      Removed value: -"#/properties/jobs/items/properties/artboard"
    • addedInput schema / properties / defaults / properties / artboard / type
      Added value: +"string"
    • removedInput schema / properties / defaults / properties / background / $ref
      Removed value: -"#/properties/jobs/items/properties/background"
    • addedInput schema / properties / defaults / properties / background / description
      Added value: +"CSS background color"
    • addedInput schema / properties / defaults / properties / background / type
      Added value: +"string"
    • removedInput schema / properties / defaults / properties / count / $ref
      Removed value: -"#/properties/jobs/items/properties/count"
    • addedInput schema / properties / defaults / properties / count / description
      Added value: +"format=sprites: frame count (default 16)"
    • addedInput schema / properties / defaults / properties / count / exclusiveMinimum
      Added value: +0
    • addedInput schema / properties / defaults / properties / count / maximum
      Added value: +256
    • addedInput schema / properties / defaults / properties / count / type
      Added value: +"integer"
    • removedInput schema / properties / defaults / properties / duration / $ref
      Removed value: -"#/properties/jobs/items/properties/duration"
    • addedInput schema / properties / defaults / properties / duration / description
      Added value: +"format=gif/apng/webm/sprites: seconds to render (default: one animation loop, or 2s)"
    • addedInput schema / properties / defaults / properties / duration / exclusiveMinimum
      Added value: +0
    • addedInput schema / properties / defaults / properties / duration / maximum
      Added value: +30
    • addedInput schema / properties / defaults / properties / duration / type
      Added value: +"number"
    • removedInput schema / properties / defaults / properties / format / $ref
      Removed value: -"#/properties/jobs/items/properties/format"
    • addedInput schema / properties / defaults / properties / format / description
      Added value: +"Output format for this job"
    • addedInput schema / properties / defaults / properties / format / enum
      Added value: +[
      +  "png",
      +  "gif",
      +  "apng",
      +  "webm",
      +  "sprites"
      +]
    • addedInput schema / properties / defaults / properties / format / type
      Added value: +"string"
    • removedInput schema / properties / defaults / properties / fps / $ref
      Removed value: -"#/properties/jobs/items/properties/fps"
    • addedInput schema / properties / defaults / properties / fps / exclusiveMinimum
      Added value: +0
    • addedInput schema / properties / defaults / properties / fps / maximum
      Added value: +60
    • addedInput schema / properties / defaults / properties / fps / type
      Added value: +"integer"
    • removedInput schema / properties / defaults / properties / height / $ref
      Removed value: -"#/properties/jobs/items/properties/height"
    • addedInput schema / properties / defaults / properties / height / exclusiveMinimum
      Added value: +0
    • addedInput schema / properties / defaults / properties / height / maximum
      Added value: +2048
    • addedInput schema / properties / defaults / properties / height / type
      Added value: +"integer"
    • removedInput schema / properties / defaults / properties / loops / $ref
      Removed value: -"#/properties/jobs/items/properties/loops"
    • addedInput schema / properties / defaults / properties / loops / description
      Added value: +"format=apng: loop count, 0=infinite (default 0)"
    • addedInput schema / properties / defaults / properties / loops / minimum
      Added value: +0
    • addedInput schema / properties / defaults / properties / loops / type
      Added value: +"integer"
    • removedInput schema / properties / defaults / properties / outDir / $ref
      Removed value: -"#/properties/jobs/items/properties/outDir"
    • addedInput schema / properties / defaults / properties / outDir / description
      Added value: +"Output directory (default: alongside the source .riv)"
    • addedInput schema / properties / defaults / properties / outDir / type
      Added value: +"string"
    • removedInput schema / properties / defaults / properties / stateMachine / $ref
      Removed value: -"#/properties/jobs/items/properties/stateMachine"
    • addedInput schema / properties / defaults / properties / stateMachine / type
      Added value: +"string"
    • removedInput schema / properties / defaults / properties / time / $ref
      Removed value: -"#/properties/jobs/items/properties/time"
    • addedInput schema / properties / defaults / properties / time / description
      Added value: +"format=png: seconds to advance before capture (default 0)"
    • addedInput schema / properties / defaults / properties / time / type
      Added value: +"number"
    • removedInput schema / properties / defaults / properties / transparent / $ref
      Removed value: -"#/properties/jobs/items/properties/transparent"
    • addedInput schema / properties / defaults / properties / transparent / description
      Added value: +"format=apng: render on a transparent background (default true)"
    • addedInput schema / properties / defaults / properties / transparent / type
      Added value: +"boolean"
    • removedInput schema / properties / defaults / properties / width / $ref
      Removed value: -"#/properties/jobs/items/properties/width"
    • addedInput schema / properties / defaults / properties / width / exclusiveMinimum
      Added value: +0
    • addedInput schema / properties / defaults / properties / width / maximum
      Added value: +2048
    • addedInput schema / properties / defaults / properties / width / type
      Added value: +"integer"
  2. First observedv0.5.0

TDQS

A4.3/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 discharges it thoroughly. It discloses the concurrency model ('sequentially reusing the same headless Chromium page (no parallel pages)'), the absence of watch mode and why, the merge semantics ('each job's own fields override them'), and error isolation ('One job's failure does not stop the batch') including the per-job report fields. This far exceeds typical disclosure.

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 definition is a single front-loaded paragraph where the opening sentence states the core function and each subsequent sentence adds a distinct operational fact (use case, defaults semantics, error handling/report). Every sentence earns its place, and the length is justified by the absence of annotations. The final sentence is slightly dense, but the structure is strong.

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?

Given a complex nested jobs array (up to 200 items), no annotations, and no output schema, the description covers a great deal: input structure, execution model, CI/script use case, defaults merging, failure semantics, and the per-job report fields (success/error/outPath/durationMs). It stops slightly short of specifying the exact top-level return shape (e.g., how the entries are aggregated), but for a tool of this complexity it is remarkably complete.

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 baseline is 3 and the schema already documents every parameter, including the defaults merge rule ('Shared defaults merged under each job (job-level values win)') and the rivPath/glob mutual exclusivity. The description's contributions — framing a job as either a rivPath or a glob and restating the override rule — add only marginal comprehension value beyond what the schema already states.

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 specific verb and resource: 'Render a list of jobs — each a single .riv (rivPath) or a glob of .riv files (glob) — to png/gif/apng/webm/sprites'. It names the exact output formats and the two input modes, and the batch/sequential framing differentiates it from the single-render siblings (riv_render_gif, riv_render_frame, etc.). An agent can tell at a glance what this tool does and how it differs from the per-format render tools.

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?

The description gives clear context: 'Built for CI/scripts: call this tool repeatedly from your pipeline instead of expecting a live watch mode — none is provided, since MCP's request/response model doesn't fit a background file watcher.' This tells the agent the intended invocation pattern and sets an explicit exclusion (no watch mode). It does not, however, explicitly route to a sibling alternative for single-file renders.

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