Write an SRT caption file
write_srt_fileCreates an .srt subtitle file from time-ordered start, end, and text segments, validating timing and optional overlaps before saving; use it to prepare captions for import into Premiere.
Instructions
Write an .srt subtitle file from a list of {start, end, text} segments (seconds). Segments must be in time order with end > start and must not overlap (allow_overlap=true permits overlaps). Nothing is written when a segment is invalid (BAD_ARGS). Writes the file directly; Premiere is not needed. Returns file_path, count, bytes, duration (end of the last caption) and readability warnings (as check_caption_readability). Fails with FILE_EXISTS if the file exists unless overwrite is true. Pass the file to import_captions_file to put it on a sequence.
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": {
"file_path": "<file_path>",
"segments": "<segments>"
},
"name": "write_srt_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| segments | Yes | The captions in time order. | |
| file_path | Yes | The .srt file to write. Absolute path; missing folders are created. | |
| overwrite | No | Replace the file if it exists. Default false. | |
| allow_overlap | No | Allow a caption to start before the previous one ends. Default false. |