Add Caption Graphics
add_caption_graphicsBurn captions into an existing Premiere Pro video track as MOGRT/Essential Graphics clips from a transcript or saved plan, with frame-accurate placement and per-clip verification.
Instructions
Burn captions into the timeline as MOGRT / Essential Graphics clips on an existing video track, one clip per caption (word_mode single or accumulate: one per word). Plans from a transcript or saved plan_path at the sequence's own frame rate, then removes this tool's earlier clips ('<name_prefix> 001', ... on that track; replace_existing true by default, read back before placing) and places clips in chunks of 25 (importMGT at the frame-rounded start, text written to the template's controls, duration trimmed, named, optional speaker colour through color_field, optional Motion position for safe_bottom / safe_middle / safe_top assuming the template's text is centred on the frame). Fit (rebreak and shrink) is ESTIMATED from character counts and a font size (font_size_px, else read from the first placed clip's text JSON fontSizeEditValue, else 6% of the frame short side with a warning); shrink rewrites fontSizeEditValue when capPropFontSizeEdit is true, else Motion Scale. Each chunk is read back in a separate call (name, start/end within half a frame, text values, colour): per clip verified, committed_unverified or mismatch; a failure or mismatch stops the run and reports what was placed, never a partial batch as success. Before anything is sent to Premiere the .mogrt is opened: a Premiere-built template (definition.json authorApp ppro) is refused, because Premiere does not expose its text to scripts (use an After Effects-built MOGRT), and every text_fields name and color_field must be a text or colour control of the template (the available names are listed when one is not). Captions are clamped to the sequence end (rule sequence_end in plan.sequence_end_changes). A template with fewer line fields than the plan has lines gets its captions re-broken to the field count (fit.rebreaks). Refuses when other clips on the track overlap the captions (use another track; add_track first if needed). expected_project_path is honoured: the server applies it to every CEP command automatically. Results can be committed_unverified. Text template convention: text_fields.line_fields ["Line 1", "Line 2"] (one line per field) or text_fields.text_field (lines joined with a carriage return). Per-word colour inside one text field has no Premiere equivalent; see host_limitations in the result.
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": {
"mogrt_path": "<mogrt_path>",
"track_index": "<track_index>",
"text_fields": "<text_fields>"
},
"name": "add_caption_graphics"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fit | No | both (default): re-break lines, then shrink. rebreak, shrink, or none (report only). Estimated from character counts. | |
| fix | No | With a standard: fix what breaks it (default true). false only reports violations. | |
| sdh | No | Subtitles for the deaf and hard of hearing: sound events and lyrics. | |
| to_s | No | Only transcript words that overlap times before this (before offset). A word or cue that straddles the bound is clipped, not dropped. Use the clip out-point so captions do not land on later shots. | |
| end_s | No | Where the sequence (or media) ends, in sequence seconds (after offset). No caption ends past it, a caption that would start at or after it is dropped, and a sound or linger extension never passes it; each is listed in changes with rule sequence_end. A transcript that states its media duration (Whisper, ElevenLabs) also clamps to that duration plus offset. create_caption_track import_plan and add_caption_graphics clamp to the sequence's own end. | |
| from_s | No | Only transcript words that overlap this time and later (before offset). A word or cue that straddles the bound is clipped, not dropped. Use the clip in-point (transcribe_audio audible_source_range) or a long transcript captioned in several calls. | |
| linger | No | Seconds a caption stays after its last word (up to the next caption), default 0.25. | |
| offset | No | Seconds added to every transcript time, for example the clip's start on the sequence (captions must not start before 0). | |
| cleanup | No | Transcript clean-up before captions are made. The result's `cleanup` counts what changed. | |
| standard | No | A caption standard: netflix_adult (20 cps, 42 cpl, 2 lines, 5/6 s to 7 s, 2-frame gaps), netflix_kids (17 cps), bbc (180 wpm, 0.33 s per word, 37 cpl), dcmp (32 cpl, 40 frames to 6 s), social_9x16 (25 cpl, 3 lines). Sets the defaults for line length, lines, durations, gaps and linger (explicit fields still win) and turns on fixing: out-times extend into the gap, then short captions merge, then long ones split. The result lists every change and any violation left. | |
| cut_times | No | Shot changes in sequence seconds (not source time). Get them from detect_scene_edits / scene_edit_detection or from the sequence's edit points. Captions do not straddle a cut: an in-time moves onto the cut or at least 0.5 s before it, an out-time to 2 frames before it or at least 0.5 s after. | |
| max_lines | No | Lines per caption, default 2. A caption is split when its words would need more. | |
| max_words | No | Words per caption at most (social chunking). | |
| placement | No | template (default): leave the template's position. safe_bottom, safe_middle, safe_top: set Motion Position so the estimated text box sits against that part of the safe area, assuming the template's text is centred on the frame. | |
| plan_path | No | Absolute path of a saved caption plan (.json written by a caption planning tool) inside approved_workspace_path (realpath-checked, at most 32 MiB). Use it instead of a transcript. Requires approved_workspace_path. | |
| safe_area | No | Safe area for the fit estimate and placement. Default reels_9_16 for a frame taller than wide, else landscape_16_9. | |
| word_mode | No | off (default): one clip per caption. single: one clip per word, from the word's highlight time (word start minus the highlight lead) to the next word's, the last to the caption end. accumulate: one clip per word showing the caption's words up to that word, in the caption's own line breaks. | |
| chunk_size | No | Clips placed per host call (default 25). At most 2000 clips per call; for more, caption parts with from_s / to_s and a different name_prefix for each part. | |
| cut_source | No | none (default): no shot-change snapping from the timeline. edit_points: read the clip start and end times of the video tracks (all of them, except the caption graphics track) and snap captions to those cuts; merged with any cut_times you pass (for example from detect_scene_edits). Ignored for a saved plan_path, whose shot-change rules are already applied. | |
| frame_rate | No | Frames per second of the sequence; every caption time is rounded to whole frames of this rate. Premiere sequences report it (or convert Sequence timebase ticks with 254016000000 ticks per second). Default 30, with a warning. | |
| mogrt_path | Yes | Absolute path of the caption .mogrt template (validated as a MOGRT archive before Premiere is contacted). | |
| color_field | No | Display name of the template's colour control, set to the speaker colour (speaker_style color) with setColorValue and read back. Without it, speaker colours are not applied (a warning says so; use speaker_style label or hyphen). | |
| name_prefix | No | Clip names are '<name_prefix> 001', '<name_prefix> 002', ... Default 'Caption'. Earlier clips with exactly this name pattern on the track are the ones replaced, so captioning a long transcript in parts (from_s / to_s) needs a different name_prefix per part, for example 'Caption A', 'Caption B'. | |
| pause_break | No | A pause between words longer than this starts a new caption, default 0.7. | |
| single_word | No | One word per caption (social style): a word shorter than 8 frames merges into the next, and a number with its unit or a first name with a surname stays together. | |
| text_fields | Yes | How lines map onto the template's text controls (display names). Give exactly one of line_fields or text_field. | |
| track_index | Yes | 0-based video track the clips are placed on. It must exist (use add_track first). Other clips on it that overlap the captions make the call refuse. | |
| font_size_px | No | The template's text size in sequence pixels, for the fit estimate. Default: read from the first placed clip's text JSON (fontSizeEditValue), else 6% of the frame short side with a warning. | |
| max_duration | No | A caption is split when it would run longer than this, default 6. | |
| min_duration | No | Seconds a caption stays up at least (up to the next caption), default 1. | |
| accessibility | No | Never use colour as the only cue: with speaker_style color, a label is added at each speaker change too. Default false. | |
| speaker_names | No | Display names for speaker ids (e.g. {"speaker_0": "ANNA"}), for labels. | |
| speaker_style | No | How a speaker change shows: color (BBC order white, yellow, cyan, green per speaker), hyphen (two speakers in one caption, each line starting '- '), label ('NAME: ' at each change). Default none. | |
| word_timeline | No | 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. Different labeled speakers may overlap; same-speaker words may not, even when another speaker is between them. | |
| min_gap_frames | No | Frames between captions at least. Default 2 with a standard, else 0. | |
| speaker_colors | No | Colours (#RRGGBB) per speaker in order of first appearance instead of the BBC order. | |
| idempotency_key | No | Optional client-chosen key (1-128 chars of A-Z a-z 0-9 . _ : -) for this intended edit. Pass a fresh key per edit and reuse it only when retrying that same edit, for example after a client-side timeout. A repeat with the same tool, key and arguments is not run again: while the first call is running it fails with IDEMPOTENCY_IN_PROGRESS (poll get_last_operations); after it finished it returns the original outcome marked replayed. A definite failure with nothing applied (receipt outcome not_applied) may be retried with the same key. Reusing a key with different arguments fails with IDEMPOTENCY_KEY_REUSED. Scoped to this MCP session (the stdio server process, or the HTTP server process when Streamable HTTP is stateless per request) and held in memory only (200 keys, 1 hour); it does not survive a restart or reconnect. Read-only invocations are never deduplicated. | |
| transcript_path | No | Absolute path of a .srt, .vtt or .json transcript inside approved_workspace_path (realpath-checked, at most 16 MiB). Requires approved_workspace_path. | |
| transcript_text | No | The transcript itself (SRT, WebVTT, or JSON: ElevenLabs Scribe, Whisper-style segments, a plain array of {text,start,end}, or Premiere's exported transcript JSON), instead of word_timeline or transcript_path. At most 16 MiB. | |
| char_width_ratio | No | Average glyph width as a share of the font size for the fit estimate. Default 0.55; a condensed face is nearer 0.45, a wide display face 0.65. | |
| close_gaps_under | No | Seconds: a gap shorter than this (and longer than the minimum) closes to min_gap_frames. Default the standard's (0.5 s), else off. | |
| replace_existing | No | Default true: remove this tool's earlier clips (names matching exactly '<name_prefix> NNN') on the track first and read back that none remain; clips with another prefix are left alone. false: refuse if any exist. A second part of a long transcript needs its own name_prefix, or it deletes the first part. | |
| transcript_format | No | Format of transcript_text or transcript_path. Default: from the file extension, else from the content. | |
| max_chars_per_line | No | Characters per line, default 32 (about 20 suits 9:16). Counted, not measured: a proportional font can run wider. | |
| expected_cep_target | No | Optional reviewed CEP sequence/clip identity and exact tick ranges. Checked before every generated command; UXP refuses this CEP-only guard. | |
| expected_project_path | No | Optional absolute saved-project path. Every generated CEP command refuses before its body when the active project differs or is unsaved. UXP commands refuse this CEP-only guard; local-only tools do not inspect Premiere. Omit to keep existing behavior. | |
| highlight_lead_frames | No | The highlighted word switches this many frames before the voice (reads as in sync). Default 1. | |
| approved_workspace_path | No | Absolute path of an existing directory the caller approved for file access. transcript_path, plan_path and output paths must be inside it. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | Whether the tool completed successfully. | |
| data | No | Tool-specific result data when ok is true; on failure, diagnostic detail when the tool provides it. | |
| tool | Yes | The registered MCP tool name. | |
| error | No | Failure detail when ok is false. | |
| receipt | No | Versioned common mutation receipt; success never implies rendered verification. | |
| idempotency | No | Present when idempotency_key deduplicated this call: replayed is true when the original outcome was returned instead of running again. |