Media
Редактирует таймкоды, смещает cue, исправляет перекрытия, калибрует CPS и экспортирует SRT, VTT, ASS или TTML.
Вызовите этот инструмент из своего кода на трёх языках.
curl -X POST 'https://api.elysiatools.com/ru/api/tools/srt-vtt-subtitle-editor' \
-H 'Content-Type: application/json' \
-d '{"subtitleText":"1\n00:00:00,000 --> 00:00:01,200\nWelcome to the lesson\n\n2\n00:00:01,000 --> 00:00:02,000\nThis line overlaps and needs repair.","inputFormat":"srt","outputFormat":"srt","shiftMilliseconds":250,"repairMode":"shift-overlaps","applyCpsCalibration":true,"targetCps":17,"maxLineLength":42}'Отправьте POST-запрос с входными данными в JSON. Параметры типа «файл» требуют предварительной загрузки.
POST https://api.elysiatools.com/ru/api/tools/srt-vtt-subtitle-editor| Имя | Тип | Обязательный | Описание |
|---|---|---|---|
| subtitleText | textarea | Да | — |
| inputFormat | select | Нет | — |
| outputFormat | select | Нет | — |
| shiftMilliseconds | number | Нет | — |
| repairMode | select | Нет | — |
Добавьте этот инструмент на свой сервер Model Context Protocol, чтобы ИИ-агенты могли перечислять и вызывать его.
Добавьте этот блок в конфигурацию вашего MCP-клиента:
{
"mcpServers": {
"elysiatools-srt-vtt-subtitle-editor": {
"name": "srt-vtt-subtitle-editor",
"description": "Редактирует таймкоды, смещает cue, исправляет перекрытия, калибрует CPS и экспортирует SRT, VTT, ASS или TTML.",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=srt-vtt-subtitle-editor",
"command": "",
"args": [],
"env": {},
"isActive": true,
"type": "sse"
}
}
}После подключения к SSE-endpoint выведите список доступных инструментов:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}Вызовите инструмент по его id; аргументы формируются из его параметров:
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "srt-vtt-subtitle-editor",
"arguments": {
"subtitleText": "1\n00:00:00,000 --> 00:00:01,200\nWelcome to the lesson\n\n2\n00:00:01,000 --> 00:00:02,000\nThis line overlaps and needs repair.",
"inputFormat": "srt",
"outputFormat": "srt",
"shiftMilliseconds": 250,
"repairMode": "shift-overlaps",
"applyCpsCalibration": true,
"targetCps": 17,
"maxLineLength": 42
}
}
}| applyCpsCalibration |
| checkbox |
| Нет |
| — |
| targetCps | number | Нет | — |
| maxLineLength | number | Нет | — |
HTML-результат
{
"result": "<div>Processed HTML content</div>",
"error": "Error message (optional)",
"message": "Notification message (optional)",
"metadata": {
"key": "value"
}
}Вопросы или проблемы? Свяжитесь с [email protected]