Plan Captions
plan_captionsPlans captions to a published standard (Netflix, BBC, DCMP or social) from transcript data, handling timing, line breaks, speakers and SDH, with SRT/VTT/TTML export.
Instructions
Plan captions to a published standard (netflix_adult, netflix_kids, bbc, dcmp, social_9x16) from a transcript (word_timeline, text or file; SRT, VTT, ElevenLabs Scribe or Premiere transcript JSON): chunking, line breaks, timing, gaps, speakers, SDH. Optionally writes the plan JSON and an SRT/VTT/TTML file. cut_times come from detect_scene_edits / scene_edit_detection or sequence edit points. Local-only; never changes Premiere.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "plan_captions"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| 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. | |
| export | No | Also write the captions as a sidecar file: SRT, WebVTT or TTML (IMSC text profile). Omit output_path to get the text back inline (up to 512 KiB). The written file is read back to confirm the cue count. | |
| 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). | |
| 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. | |
| 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. | |
| 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. | |
| 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. | |
| plan_output_path | No | Absolute .json path of a new file inside approved_workspace_path to save the plan document to (never overwrites). Host tools (create_caption_track action import_plan, add_caption_graphics) take it as plan_path. Required when the plan is too big to return inline (above 500 captions or 256 KiB) unless export.output_path is set. | |
| 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. | |
| sequence_timebase_ticks | No | Premiere ticks per frame of the sequence (the timebase from get_sequence_settings; 254016000000 ticks make a second). Converted to a frame rate with the common rates snapped (23.976, 25, 29.97 ...). An error when frame_rate is also given and differs. |
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. |