Skip to main content
Glama

Add markers at scene changes of a clip

add_scene_markers

Detect shot changes in a timeline clip's source video with ffmpeg and add sequence markers at each cut, mapped to timeline time; use dry_run to preview marker times without changes.

Instructions

Detect the shot changes inside one timeline clip's source video with ffmpeg (scene score) and add a sequence marker at each change, mapped to timeline time (clip start + source time - clip in point). Only the part of the media the clip uses is analysed. Pass clip_id (or track_type + track_index + clip_index). Returns the markers added (time, name). dry_run returns the times only. Needs ffmpeg.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "add_scene_markers"
  }
}

Input Schema

NameRequiredDescriptionDefault
colorNoMarker colour index: 0 green, 1 red, 2 purple, 3 orange, 4 yellow, 5 white, 6 blue, 7 cyan. Default: Premiere's default.
clip_idNoThe clip to analyse (a video clip).
dry_runNotrue: return the plan without changing anything. Default false.
thresholdNoScene score (0-1) a frame must exceed to count as a change. Default 0.3; lower finds more.
clip_indexNo0-based position of the clip in its track.
track_typeNoWith track_index + clip_index when clip_id is not given. Default "video".
name_prefixNoMarker names are "<prefix> <n>". Default "Scene".
sequence_idNoStable sequence id (from list_sequences). Omit to use the active sequence.
track_indexNo0-based track index.
sequence_nameNoSequence name; used only when sequence_id is not given.
min_spacing_secondsNoIgnore a change closer than this to the previous one, in seconds. Default 0.5.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.3/5.0
Behavior4/5

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

Goes well beyond the annotations by disclosing the external ffmpeg dependency, the exact timeline mapping formula (clip start + source time - clip in point), the fact that only the used portion of the media is analysed, and that dry_run returns times only. The notable gap is repeat-run behavior: with idempotentHint=false, an agent would benefit from being told that re-running appends another set of markers rather than replacing them.

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?

Four tight sentences, front-loaded with the action and its mechanism, then addressing, then return values, then the dependency. No filler; the trailing "Needs ffmpeg." is terse but earns its place as a prerequisite flag.

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 11 optional parameters and no output schema, the description supplies the missing return shape (markers added: time, name), the addressing scheme, the preview mode, and the runtime dependency. What remains unsaid — duplicate handling on repeat runs and failure behavior when ffmpeg is absent or no scenes are found — are the only meaningful holes.

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 100%, so baseline is 3, but the description adds real cross-parameter meaning: the two alternative addressing modes (clip_id vs. track triple) and what dry_run actually returns. It leaves threshold, min_spacing_seconds, name_prefix and color entirely to the schema, which is acceptable given the schema documents them well.

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+resource: detect shot changes in one clip's source video with ffmpeg and add a sequence marker at each change. It also scopes the operation ("one timeline clip's source video", "Only the part of the media the clip uses is analysed"), which cleanly separates it from file-level siblings like detect_scene_changes_in_file and interval-based ones like add_markers_at_interval.

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 clear operating context: pass clip_id or the track_type + track_index + clip_index triple, and dry_run to preview. It does not explicitly say when to prefer this over detect_scene_changes_in_file or add_markers_at_clip_starts, but the one-clip scope plus the preview mode makes the intended use unambiguous.

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

Deploy Server

Other Tools