Detect Repeated Takes
detect_repeated_takesDetect repeated sentence takes in a word timeline, group retakes, and plan which ranges to remove while keeping one take; returns keep/removal ranges and apply routes without editing Premiere.
Instructions
Detect repeated sentence takes (retakes) in a word timeline using token similarity within a time window, and plan removal of all but the kept take. Returns take groups, removal and keep ranges, and apply routes. Local-only; never changes Premiere.
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": {
"word_timeline": "<word_timeline>"
},
"name": "detect_repeated_takes"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| keep | No | Which take in each group to keep; defaults to last. | |
| min_words | No | Minimum tokens a sentence needs before it is compared; defaults to 4. | |
| frame_rate | No | Timebase used to snap ranges to whole frames; defaults to 30. | |
| max_groups | No | Maximum take groups to return; defaults to 64. | |
| handle_frames | No | Frames of handle left inside each removal so cuts are not tight; defaults to 1. | |
| 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. Different labeled speakers may overlap; same-speaker words may not, even when another speaker is between them. | |
| max_gap_seconds | No | Only sentences starting within this many seconds of an earlier candidate are compared; defaults to 20. | |
| 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. | |
| similarity_threshold | No | Token Jaccard/containment similarity needed to group two sentences; defaults to 0.8. | |
| 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. |
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. |