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 (read or change them with translation_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

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.9/5.0
Behavior5/5

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

Annotations only declare non-read-only and non-destructive; the description supplies the real behavioral load — validation refusals with an allowed range, the 0.1s minimum, no-overlap and in-clip constraints, translation-mode restrictions (edit retargets translated text, split refused), custom timing being invalidated by voiceover regeneration, and per-clip vs all-clip concurrency semantics. None of this is recoverable from the annotations or schema.

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 core purpose, then organized as a list-first procedure followed by per-action bullets and a trailing Rules/Concurrency block, so it is scannable despite its length. A few parenthetical asides (e.g. the long-project translation advice) are helpful but push it toward the verbose end of acceptable.

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?

A 12-action, 10-parameter tool with no output schema demands a lot, and the description covers the discovery path (what list returns), each mutation's effect and reversibility (reset, timing_reset, merge only undoes split), failure modes, and cross-clip side effects. Nothing an agent needs in order to call it correctly appears to be missing.

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

Parameters5/5

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

Although schema coverage is 100%, the description adds meaning the schema cannot carry: split_word_index is the word that STARTS the second caption (with the block-word arithmetic spelled out), merge takes the SECOND caption's start_word_index, times are seconds from clip start, and clip_index is omitted for translate/language to hit every clip. These are exactly the indexing and unit ambiguities that cause wrong calls.

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?

Opens with a specific verb+resource pair ("Read and edit a clip's CAPTIONS") and immediately scopes it to what, where boundaries fall, timing, manual captions and translation. It explicitly separates itself from voiceover_batch (spoken audio), export_project (burn-in) and translation_glossary (rules/glossary), so an agent can distinguish it from all relevant siblings.

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 entry procedure ("Start with action=\"list\"") and then per-action guidance including when to prefer manual_add (clips with no voiceover, gap filling) and when merge is valid (only when mergeable:true). It also names the correct sibling for the adjacent need (voiceover_batch for what is spoken, set_voice for voiceover language), which is the strongest form of alternative routing.

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.