Skip to main content
Glama

Render Video (Parallel Workers)

render_video
Destructive

Render a video by splitting frame generation across parallel workers, encoding each segment, and joining them with ffmpeg. Specify a worker script, output path, and duration.

Instructions

Render a video by running a frame-generating worker script across parallel worker threads. Splits the frame range across N workers, encodes one MP4 segment per worker, then joins segments with stream copy. Prerequisites: ffmpeg installed, plus a worker script implementing the ffmpeg-render-pro worker contract; call get_worker_template first if you need to author a worker, or use its templatePath for a ready-made test scene. Side effects: overwrites output_path if it already exists and writes dashboard files under /preview. Long renders emit MCP progress notifications when the client supplies a progressToken (enable resetTimeoutOnProgress for renders longer than the client request timeout; per-frame progress detail requires dashboard true, the default). Client cancellation stops all workers and removes temp files. Note: this tool defaults to 30 fps; the CLI defaults to 60.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fpsNoFramerate in frames per second, 1-240. Default 30 for this tool (CLI default is 60).
seedNoRNG seed passed to workers for deterministic output. Default 42.
titleNoTitle shown in the dashboard. Default "Render".Render
widthNoFrame width in pixels. Must be even (yuv420p). Default 1920, max 7680.
heightNoFrame height in pixels. Must be even (yuv420p). Default 1080, max 4320.
workersNoExact worker thread count, overriding auto-detection. Omit to auto-detect from CPU/RAM.
durationYesVideo duration in seconds. Required.
auto_openNoOpen the dashboard in a browser. Default true; set false for headless or server use.
dashboardNoServe the live HTML progress dashboard and write preview JSON files. Default true.
linger_msNoHow long the dashboard stays up after completion, in milliseconds. Default 30000; 0 stops it immediately.
max_workersNoCap for the auto-detected worker count. Ignored when workers is set. Default 8.
output_pathYesOutput video file path. Overwritten if it already exists.
worker_scriptYesAbsolute path to the worker .js file that generates frames. Must implement the contract returned by get_worker_template.
dashboard_portNoDashboard starting port, 1-65535. Default 8080; increments if occupied.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
avgFpsYesAverage frames encoded per second across the whole render
outputPathYesAbsolute path of the rendered video file
totalFramesYesTotal frames rendered
elapsedSecondsYesWall-clock render time in seconds

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.5.2

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true, but the description goes far beyond: it spells out that output_path is overwritten, that dashboard files are written, that progress notifications depend on a progressToken and resetTimeoutOnProgress, that cancellation stops workers and removes temp files, and it discloses the fps default discrepancy. This is rich behavioral context with no contradiction.

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 dense but well-organized: it opens with the core action, then prerequisites, side effects, progress behavior, cancellation, and a final note on fps defaults. Every sentence contributes new information and the structure is logical. It is slightly long but not bloated; a 4 reflects its efficiency and front-loaded action.

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 tool with 14 parameters, an output schema, and multiple behavioral nuances (destructive, progress, cancellation, dashboard), the description covers all essential usage aspects: prerequisites, side effects, progress token handling, cancellation semantics, and the CLI difference. The output schema handles return values, so nothing critical is missing.

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 schema already documents every parameter (including defaults, ranges, and even the CLI fps difference for the fps param). The description itself adds little parameter-specific meaning; it references the worker contract and prerequisites but does not elaborate on individual params. Baseline 3 is appropriate since the schema carries the burden.

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-resource pair ('Render a video') and the precise mechanism ('running a frame-generating worker script across parallel worker threads'), which clearly distinguishes it from siblings like concat_videos or color_grade. It also mentions the segmentation approach (one MP4 per worker, then stream copy) so an agent understands the exact operation.

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?

Provides clear context: prerequisites (ffmpeg, worker contract), when to call get_worker_template first, and side effects. It notes a key distinction from the CLI (fps defaults) but doesn't explicitly state 'use this instead of X' for sibling tools. The guidance is sufficient for correct invocation though not exhaustive about alternatives.

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