Skip to main content
Glama

Edit captions

captions

Read and edit a clip's CAPTIONS (subtitles) — what they say, where one caption ends and the next begins, when each shows, captions not tied to the voiceover, and translation. Captions are built from the clip's voiceover words: each caption is a run of words, addressed by its start_word_index.

Start with action="list" on the clip — it returns blocks (voiceover captions: start_word_index, end_word_index, start/end in clip seconds, text, transcript_text, words, edited, retimed, mergeable), manual_captions ({caption_id, start, end, text}), active_language and translated_languages. Then:

  • edit (start_word_index, text) — change what ONE caption says on screen. The voiceover audio, its words and timing are untouched; to change what is SPOKEN use voiceover_batch. reset (start_word_index) restores the transcript text.

  • split (start_word_index, split_word_index) — cut a caption in two; split_word_index is the word that STARTS the second caption (block word i = start_word_index + i; not the first word). Edited text, per-caption style and custom timing are divided between the halves — re-check both and edit them if the cut landed badly. merge (start_word_index of the SECOND caption) only undoes a split (mergeable: true); other boundaries come from the transcript's sentences and pauses.

  • timing (start_word_index, start_time, end_time) — when one caption shows, in seconds from the START OF THE CLIP. timing_reset returns it to its words' own timing.

  • manual_add (start_time, end_time, text) → caption_id; manual_edit (caption_id, and text and/or start_time/end_time); manual_remove (caption_id). Manual captions have their own text and window — use them on clips with NO voiceover (list returns no blocks there) or to fill a gap. Adding/editing one turns captions on for the clip. They show without word highlighting.

  • translate (language: id like "fr" or name like "French") — translate caption TEXT (edited and manual captions included) using the workspace's translation rules and glossary. Omit clip_index for every clip. The new language becomes the one shown; earlier languages are kept. The voiceover stays in its language (use set_voice for that). One translation call per clip, so a long project takes a while — do one clip first if only one was asked about.

  • language (language: an already-translated id, or "original") — switch which translation is shown, instantly, without re-translating. Omit clip_index for every clip.

Rules: a caption lasts at least 0.1s, stays inside the clip, and never overlaps another caption; anything else is REFUSED with the allowed range — read it and retry. While a translation is shown, edit/manual_edit change the translated text and split is refused (switch to "original" first). Custom timing is tied to a caption's exact words and stops applying if the voiceover is regenerated.

To burn captions into an exported video use export_project(captions=true).

Concurrency: clip-scoped mutation (conflict domain: the clip's caption settings) — serialize calls on the SAME clip; different clips run in parallel. translate/language without clip_index touch every clip: run them alone.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textNoedit / manual_add / manual_edit — the caption text.
actionYesWhat to do — see the tool description
end_timeNotiming / manual_add / manual_edit — seconds from the start of the clip.
languageNotranslate — language id ("fr") or name ("French"). language — a translated id, or "original".
caption_idNomanual_edit / manual_remove — from list's manual_captions.
clip_indexNoThe clip. Required for every action except translate/language, where omitting it means every clip.
project_idYesThe project ID
start_timeNotiming / manual_add / manual_edit — seconds from the start of the clip.
split_word_indexNosplit — the word that starts the new second caption.
start_word_indexNoedit/reset/split/merge/timing/timing_reset — the caption, exactly as list returned it.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.8/5.0
Behavior5/5

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

Annotations cover only the mutation/safety profile; the description adds substantial context beyond them: minimum 0.1s duration, no-overlap and in-clip constraints with REFUSED-with-range behavior, that editing/adding a manual caption turns captions on, that earlier translations are retained, that split is refused while a translation is shown, that custom timing is lost on voiceover regeneration, and concurrency/serialization rules. This is a rich disclosure of consequences.

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?

Front-loaded with the list-first instruction and then organized action-by-action, so a reader can skip to the relevant bullet. It is long, but the density of distinct, non-redundant behavior for a 12-action tool mostly justifies the length; a few clauses could be trimmed.

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?

With no output schema, the description compensates by documenting list's return shape (blocks fields, manual_captions, active_language, translated_languages), the rule set that governs acceptance, the translation-vs-language distinction, and the concurrency domain. Nothing essential for correct invocation or interpretation of results 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 description coverage is 100%, so the baseline is 3; the description meaningfully exceeds it by explaining addressing semantics: start_word_index identifies a caption as list returned it, split_word_index is the word that STARTS the second caption (block word i = start_word_index + i), and merge takes the SECOND caption's start_word_index. It also clarifies that timing values are seconds from clip start and the accepted language formats.

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+resource ('Read and edit a clip's CAPTIONS'), then enumerates the full scope (text, boundaries, timing, manual captions, translation). It explicitly routes siblings apart: edit vs voiceover_batch for spoken words, translate vs set_voice, and export_project(captions=true) for burning. An agent can identify this tool's territory without opening other schemas.

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?

Gives an explicit 'start with list' workflow, then per-action when-to-use: reset restores transcript, merge only undoes a split, manual_* for clips with no voiceover or to fill gaps, language to switch instantly vs translate to re-translate, and a caution to translate one clip first. Alternatives and preconditions are stated rather than inferred.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.