Convert subtitles between SRT and WebVTT
convert_subtitlesConvert subtitle text between SubRip (srt) and WebVTT (vtt), optionally shifting every cue by shiftMs, and return the converted text with the detected source format, cue count, parse warnings (with line numbers) and timing issues (overlapping, zero-length or out-of-order cues). Pass the file contents, not a path. Malformed blocks are skipped with a warning instead of failing the whole file. ASS/SSA input is not supported here; the @prismposter/creator-tools package converts it. Errors when no cue could be parsed, the input is over 2 MB, or the shift is beyond one hour.
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": {
"input": "<input>",
"toFormat": "<toFormat>"
},
"name": "convert_subtitles"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| input | Yes | The full SRT or WebVTT file contents as text. | |
| shiftMs | No | Move every cue by this many ms: positive is later, negative earlier. | |
| toFormat | Yes | Format to convert to. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| endMs | Yes | ||
| issues | Yes | ||
| output | Yes | ||
| shiftMs | Yes | ||
| cueCount | Yes | ||
| warnings | Yes | ||
| sourceFormat | Yes | ||
| targetFormat | Yes | ||
| referenceToolUrl | Yes |