Skip to main content
Glama

Add captions to a video

flow_captions

Burn spoken-word captions into landscape or vertical videos locally with whisper.cpp, using short-form styles across about 100 languages.

Instructions

Burn spoken-word captions into a video, in the style short-form apps use, for landscape or vertical footage (local and free: whisper.cpp hears the words on this computer, nothing is uploaded). Styles: bold (big capitals, the spoken word lights up), highlight, reveal, clean, boxed. Works in about 100 languages, including ones written without spaces (Japanese, Chinese, Thai) and right to left (Arabic, Hebrew); pass language (en, es, tr, ja...) whenever you know it. The first call downloads a speech model once: 148 MB for English, 574 MB for other languages. Saves -captions.mp4 plus an .srt. Before calling this, call flow_transcribe, show the user the words with any likely mishearings fixed, and get their OK: then pass the agreed words as text (matching words keep their timing), so the video is made once, right.

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": {
      "video": "<video>"
    },
    "name": "flow_captions"
  }
}

Input Schema

NameRequiredDescriptionDefault
leadNoSeconds the highlight runs ahead of the voice. Default 0.12; raise it if words still light up late, lower it if early.
sizeNosmall, medium, large, or a percentage of the style's normal size (100 = medium, 150 = half again as big).medium
textNoCorrected words, to fix anything misheard. Timings are kept for every word that still matches; a line break starts a new caption.
colorNoHighlight colour as #RRGGBB, for bold, highlight and reveal.
namesNoLowercase only: names to keep capitalised even where they start a sentence (e.g. ["Juno"]). Names in the middle of a sentence are found by themselves.
styleNobold: big capitals, 1-3 words at a time, the spoken word lights up (the short-form look). highlight: the spoken word sits on a coloured block. reveal: words appear as they are said. clean: classic subtitles. boxed: white words on a dark band.bold
videoYesAbsolute path of the video to caption: any MP4 or MOV on this computer, such as a film made with flow_assemble.
wordsNoWord timings to use instead of hearing the whole video, e.g. from flow_transcribe on each clip of a joined film, shifted by where each clip starts in it. Use it when the film's own sound (music, a train, crowd) throws the timing off. text still corrects the words on top.
lettersNoas_said keeps normal capitals (sentence starts, names); capitals is the high-energy short-form look; lowercase is the calm, casual look, and names still keep their capital in it. Default: capitals for bold, as_said for the rest.
projectNoFilms folder to save into. Default: the video's own folder when it is already in the films folder, otherwise 'Captions'.
languageNoSpoken language as a code: en, es, fr, de, pt, tr, ja, zh, ar... Pass it whenever you know it. auto detects it (a 60 MB detector downloads once). English uses a 148 MB model; every other language a 574 MB one, each downloaded the first time.auto
positionNobottom, middle or top - or a number for an exact height: how far down the frame the middle of the caption sits, 0 = top edge, 100 = bottom edge.bottom

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior4/5

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

Beyond the annotations, it discloses that processing is local with nothing uploaded, that a speech model downloads once (148 MB English / 574 MB others), and that output is a <name>-captions.mp4 plus an .srt. That is strong side-effect and first-run disclosure. It stops short of saying whether a re-run overwrites the existing files, which matters given idempotentHint=false.

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 purpose, privacy note, and style summary are front-loaded, and the workflow instruction lands last where an agent will see it before invoking. It is longer than average and repeats the style enum descriptions, but nearly every clause carries decision-relevant information.

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 12-parameter, output-less tool, the definition covers cost, language support including no-space and RTL scripts, output artifacts, the model download caveat, and the exact call sequence. Nothing an agent needs in order to invoke it correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline would be 3, but the description adds real meaning: that `text` keeps timing for matching words, that `language` should be passed whenever known, and that timings survive line breaks. The style list partly duplicates the enum's own descriptions, which keeps it from a 5.

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 opening sentence names a specific verb and resource ('Burn spoken-word captions into a video'), its visual style, and the footage types it targets. An agent can distinguish it immediately from flow_transcribe (which only extracts words) without opening either schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives an explicit prerequisite workflow: call flow_transcribe first, show the user corrected words, get their OK, then pass them as `text`. It also names an alternative path via `words` when the film's own soundtrack throws timing off, which is exactly the when/when-not coverage a good definition needs.

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