Skip to main content
Glama

Import subtitles

import_subtitles
Destructive

Convert and import SRT or WebVTT files as Kdenlive-compatible ASS subtitles, with frame-rounded timing, styling conversion, and optional offset or replacement of existing subtitles.

Instructions

Import a SubRip (.srt) or WebVTT (.vtt) file, UTF-8 or UTF-16 with a byte order mark, as the main sequence's subtitles, in Kdenlive's own format: an ASS file named after the saved project (<destination>.ass) with Kdenlive's default style. Times are rounded to frames; overlapping subtitles go to separate layers; , , become ASS styling, other styling is dropped (warnings). Existing subtitles are refused ([subtitles_exist]) unless replace=true; written to a new destination their file is untouched, replaced in place it is backed up first. offset shifts every subtitle by that many frames. The result is written to destination with the save_project_copy rules.

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": {
      "path": "<path>",
      "subtitle_file": "<subtitle_file>",
      "destination": "<destination>"
    },
    "name": "import_subtitles"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesAbsolute path of a .kdenlive project file on this machine.
offsetNoFrames added to every subtitle.
replaceNo
sequenceNoSequence uuid or name; default: active sequence.
overwriteNoAllow replacing an existing destination file.
destinationYesAbsolute path of the .kdenlive file to write (the source by default is never modified; see save_project_copy for the overwrite rules).
subtitle_fileYesPath of the .srt or .vtt file.
expected_sha256NoRequired to write over the source: its sha256 as last read. Tools that take `revision` use it when this is omitted.

Output Schema

NameRequiredDescriptionDefault
audioNo
mediaNo
savedYes
titleNo
trackNo
relinkNo
effectsNo
markersNo
timelineNo
subtitlesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.3.0

TDQS

A4.5/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already flag destructiveHint=true and non-idempotent, and the description goes well beyond them: it discloses frame rounding, layer splitting for overlaps, which inline styling survives versus is dropped with warnings, the refusal error key, and the backup-before-in-place-replace guarantee. It also clarifies that writing to a new destination leaves the source file untouched.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Purpose is front-loaded in the first clause, and nearly every sentence carries operational detail. It is a single dense paragraph, though, and the fallback to save_project_copy rules plus the styling/warning parenthetical make it heavier to scan than necessary.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With an output schema present, the description need not explain return values, and it covers the mutation semantics, refusal path, and backup behavior thoroughly. The main omissions are the `sequence` target selector and the `expected_sha256` concurrency guard, which matter for an 8-parameter mutating tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 88%, so the baseline is 3, but the description adds real meaning: accepted encodings (UTF-8 or UTF-16 with BOM) for subtitle_file, the semantics of `offset` as a per-subtitle frame shift, and how `replace` versus a fresh `destination` change file handling. `sequence` and `expected_sha256` are left entirely to the schema, which keeps it from a 5.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource (import a SubRip/WebVTT file as the main sequence's subtitles) and the exact output artifact (`<destination>.ass` in Kdenlive's ASS format with default styling). This is precise enough that an agent can distinguish it from listing or project-save siblings without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives explicit conditions: existing subtitles are refused ([subtitles_exist]) unless replace=true, and overwrite rules are delegated to save_project_copy. It does not name an alternative tool for the case where the agent only wants to inspect subtitles (e.g. list_subtitles), so it stops short of full when/when-not routing.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.