Build Caption Artifact
build_caption_artifactCreates SRT/VTT captions from word timelines with balanced cues, sentence breaks, karaoke timestamps, emphasis, and speaker labels. Returns inline or writes to approved workspace; Premiere unchanged.
Instructions
Build a CapCut/Submagic-style SRT or VTT caption artifact from a caller-supplied word timeline: balanced word groups, sentence-aware breaks, min/max cue durations, optional karaoke word timestamps (VTT), emphasis and speaker markup. Local-only; returns the artifact inline or writes it inside an approved workspace and never changes Premiere.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| format | Yes | Artifact format. SRT uses HH:MM:SS,mmm; VTT starts with WEBVTT and uses HH:MM:SS.mmm. | |
| karaoke | No | VTT only: emit per-word <HH:MM:SS.mmm> timestamps inside each cue for word-highlight styles. Errors for SRT. | |
| max_lines | No | Maximum lines of plain caption text per cue (default 1); markup does not add lines. | |
| uppercase | No | Render caption text in upper case. | |
| output_path | No | Optional absolute file path to write the artifact to. Requires approved_workspace_path; the file must not already exist. When omitted the artifact text is returned inline (up to 512 KiB). | |
| style_preset | No | Style descriptor to return with the artifact (default clean). Documentation only; not encoded in SRT/VTT. | |
| strip_fillers | No | Tokens removed from the caption text (case-insensitive, punctuation ignored). | |
| word_timeline | Yes | Caller-supplied word-timed transcript for one Premiere source item. Words must be ordered by start time and bound to the transcript revision returned by get_clip_transcript_uxp. | |
| words_per_cue | No | Target words per cue (default 4); sentences are split into balanced groups of at most this many words. | |
| emphasis_words | No | Words wrapped in <b> (SRT) or <c.emphasis> (VTT). | |
| speaker_prefix | No | Prefix cues with the speaker label when present: 'Speaker: ' in SRT, <v Speaker> in VTT. | |
| max_cue_seconds | No | Maximum cue duration (default 5). | |
| min_cue_seconds | No | Minimum cue duration (default 0.5); short cues are extended but never past the next cue start. | |
| merge_gap_seconds | No | Extend a cue to the next cue start when the gap is smaller than this (default 0.3) so captions do not flicker. | |
| max_chars_per_line | No | Maximum characters per line of plain caption text (default 32); words are never split. Wrapping counts unescaped words only, so VTT escaping, karaoke timestamps, emphasis tags, and speaker prefixes can make the rendered line longer. | |
| approved_workspace_path | No | Absolute existing directory that must contain output_path (checked via realpath of the parent directory). Required with output_path. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | Whether the tool completed successfully. | |
| data | No | Tool-specific result data when ok is true. | |
| tool | Yes | The registered MCP tool name. | |
| error | No | Failure detail when ok is false. |