Skip to main content
Glama

detect_scenes

Detect video cuts and scene transitions, returning JSON timestamps, scene durations, and cut boundaries, with an optional contact-sheet preview for vision models.

Instructions

Detect video cuts and scene transitions. Returns structured timestamps, scene durations, and cut boundaries as JSON, with optional contact-sheet image preview for vision models.

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": {
      "inputPath": "<inputPath>"
    },
    "name": "detect_scenes"
  }
}

Input Schema

NameRequiredDescriptionDefault
inputPathYesPath to the source video file to analyze for scene transitions.
thresholdNoScene cut sensitivity threshold between 0.05 and 1.0. Lower values detect subtle transitions; higher values detect only dramatic scene cuts. Default: 0.3.
outputPathNoOptional destination path for a contact-sheet montage image (.png or .jpg) visualizing detected scenes.
includeBase64NoReturn base64 contact sheet image data in response for vision models when outputPath is specified. Default: true.
minDurationSecondsNoMinimum scene duration in seconds to filter out rapid flashes or micro-cuts. Default: 0.5.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.6.0

TDQS

B3.4/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full burden; it does disclose the return shape (timestamps, durations, cut boundaries as JSON) and the optional contact-sheet preview, which is real behavioral context. However, it says nothing about whether the operation mutates the input, whether it is expensive/slow on long videos, or whether failure modes exist for missing/corrupt files – notable gaps for an unannotated media tool.

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

Conciseness5/5

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

Two sentences, purpose front-loaded, second sentence dedicated to return values and the optional image preview. No filler or restatement of the name.

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 no output schema, the description correctly picks up the slack by summarizing the JSON return and the vision-model contact sheet, which is enough to call the tool correctly given five well-documented parameters. It could be stronger with a note on processing cost or input-file requirements, but nothing essential is missing.

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 description coverage is 100%, including defaults, ranges, and the meaning of threshold and minDurationSeconds, so the schema already does the parameter work. The description adds only a light gloss on the contact-sheet preview (mapping to outputPath/includeBase64), which the schema covers more precisely; baseline 3 applies.

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

Purpose4/5

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

Names a specific verb and resource ('detect video cuts and scene transitions'), which is distinct from every sibling (probe, keyframe extraction, trimming) without needing the schema. It stops short of explicitly contrasting with the nearest sibling, extract_keyframes, so it's clear but not maximally differentiated.

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

Usage Guidelines2/5

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

There is no when-to-use or when-not-to-use guidance and no mention of alternatives such as extract_keyframes or media_probe that an agent might reasonably consider for a similar analysis task. The agent must infer the choice from purpose alone.

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