Skip to main content
Glama

Render the film to MP4

render_video

Render every frame of a film to H.264 MP4 at low priority, validate that all frames decode and audio spans the film, and return output path, frame count, time, and encoder.

Instructions

Renders every frame of a film to an H.264 MP4 at low priority, with the in-page hardware encoder by default. Before saving, it checks the file: every rendered frame decodes and the soundtrack runs from the start to the end of the film; a short or misaligned file fails. Returns the output path, frame count, time and encoder (enc=wc is the fast path), not the progress log. Sends progress if the client asks for it.

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": {
      "demo": "<demo>"
    },
    "name": "render_video"
  }
}

Input Schema

NameRequiredDescriptionDefault
qNoQuery string passed to the page as location.search, e.g. 'lang=en&cut=b'.
fpsNoDefault 24.
outNoOutput mp4. Default <demo>/out/video.mp4. Each parallel render needs its own out.
demoYesFolder that holds the film's index.html (absolute path, or relative to the library root).
mbpsNoBitrate for the WebCodecs path. Default 20.
sizeNoFrame size WxH, even numbers. Default 1920x1080; 1080x1920 for a vertical Short.
audioNoSound file to mux in (AAC 192k). A soundtrack shorter than the film is padded with silence; a longer one is cut at the end. For a mastered mix use mux_audio instead.
encoderNoauto (default) tries WebCodecs, then VideoToolbox, then x264.
workersNoParallel browser workers. Default 3.
allow_short_audioNoSet true only when the soundtrack is meant to end before the film: it is then left short instead of padded. Default false.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: low priority execution, in-page hardware encoder by default, a pre-save validation pass (every frame decodes, soundtrack spans the film, short or misaligned files fail), and what is and is not returned (no progress log unless requested). It stops short of overwrite semantics for an existing out file or how failures are surfaced.

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?

Four dense sentences, front-loaded with the action and format, then the verification guarantee, then the return shape. No filler; each clause carries distinct information.

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 ten-parameter render tool with no output schema, the description supplies the return values (output path, frame count, time, encoder) and the validation contract. Remaining gaps — overwrite behavior on the out path and error reporting — are minor but real.

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 coverage is 100%, so all ten parameters are already documented in structured fields, and the baseline is 3. The description adds only the enc=wc fast-path note and the progress-on-request behavior, which barely extends what the schema already says about encoder and out.

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?

States a specific verb and resource — renders every frame of a film to an H.264 MP4 — plus the encoder default and priority. An agent can distinguish this from render_stills or mux_audio without opening the schema.

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 only implied: this is the full-film render step, and 'enc=wc is the fast path' hints at the encoder choice. The description never says when to pick this over render_stills or mux_audio, and the mux_audio alternative is mentioned only inside the audio parameter's schema text, not the description itself.

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