Skip to main content
Glama

Add crossfade

add_mix
Destructive

Crossfade a clip into the next touching clip on its track, extending both into their source handles and adding a matching audio crossfade, then write the result to a destination file.

Instructions

Crossfade a clip into the next clip on its track (they must touch), like Kdenlive's Mix Clips: both clips extend into their source handles around the cut, and grouped audio gets the matching audio crossfade. duration in frames (default 1 second). 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>",
      "clip": "<clip>",
      "revision": "<revision>",
      "destination": "<destination>"
    },
    "name": "add_mix"
  }
}

Input Schema

NameRequiredDescriptionDefault
clipYesClip ref from get_timeline, '<track>@<start>' (e.g. 'V1@90'). It changes when the clip moves: read the timeline again after an edit.
pathYesAbsolute path of a .kdenlive project file on this machine.
durationNo
revisionYessha256 of the project file (file.sha256 from get_timeline) that the clip ref comes from; the edit is refused if the file changed since.
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).
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.1/5.0
Behavior4/5

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

Annotations already declare destructive=true and readOnly=false, but the description adds the key safety fact that the source file is never modified by default and that the result goes to `destination`. It also discloses the revision guard and the default 1-second duration. It defers the overwrite/destructive rules to save_project_copy rather than stating what replacing an existing destination file destroys.

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?

Front-loaded with the action and its precondition, then the mechanics, then the output target and duration semantics. Dense but every sentence carries information; the parenthetical 'they must touch' is well placed.

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 and rich annotations present, the description covers the operation, its precondition, the write target, and the duration default, which is sufficient to invoke correctly. The overwrite/destructive specifics are cross-referenced rather than explained, and the failure mode when clips don't touch is left implicit.

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

Parameters3/5

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

Schema coverage is already 88%, so most parameters are self-documented; the description adds mostly the unit and default meaning for `duration` ('in frames, default 1 second'), which the schema leaves as null with a minimum of 2. Other parameters such as `sequence` and `expected_sha256` get no extra explanation in the description beyond the schema's own text.

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 ('Crossfade a clip into the next clip on its track') and explains the mechanical result: both clips extend into their source handles around the cut and grouped audio receives a matching audio crossfade. The Kdenlive 'Mix Clips' analogy plus the inversion implied by the remove_mix sibling makes the operation unmistakable.

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 a hard precondition ('they must touch') and points to save_project_copy for the write/overwrite rules, which is real routing guidance. It stops short of explicit when-not-to-use or a named alternative (e.g. set_clip_fades for a one-sided fade), leaving that inference to the agent.

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