Skip to main content
Glama

merge_videos

DestructiveIdempotent

Concatenates two or more rendered MP4 clips in order, shifting matching SRT/VTT subtitles, and writes a single output video with fail-closed validation.

Instructions

Concatenate two or more rendered videos from out/.mp4 (along with their shifted .srt and .vtt subtitles when present) into out/<out_slug>.mp4 via FFmpeg. Fails closed if any input MP4 is missing, slugs are invalid, FFmpeg is missing, or out/<out_slug>.mp4 exists and overwrite=false.

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": {
      "out_slug": "<out_slug>",
      "clip_slugs": "<clip_slugs>"
    },
    "name": "merge_videos"
  }
}

Input Schema

NameRequiredDescriptionDefault
out_slugYesOutput slug for out/<out_slug>.mp4 (lowercase letters, digits, _ or -)
overwriteNoAllow replacing an existing out/<out_slug>.mp4 (default false refuses)
clip_slugsYesOrdered list of 2 or more existing video slugs in out/ to concatenate

Output Schema

NameRequiredDescriptionDefault
okYes
mp4Yes
bytesYes
clipsYes
out_slugYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.12

TDQS

A4/5.0
Behavior4/5

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

Annotations already flag destructiveHint=true and idempotentHint=true, but the description adds real context: the output filename is derived from out_slug, an existing file is only replaced when overwrite=true, the operation fails closed on missing MP4s/invalid slugs/missing FFmpeg, and subtitle sidecar files are carried along and shifted. That goes meaningfully beyond the annotation set.

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, front-loaded with the action and paths, then the failure contract. Every clause carries information (input location, output location, subtitle handling, failure conditions) with no filler.

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?

For a destructive mutation tool with annotations and an output schema, the description covers inputs, output path, overwrite guard, and failure modes. The only residual ambiguity is how subtitles from multiple clips are reconciled into the merged output, but return-value details are properly left to the output schema.

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%, so the schema already explains out_slug, overwrite, and clip_slugs. The description reinforces slug validity and the overwrite=false refusal condition but adds no new syntax or constraint detail, so the baseline 3 applies.

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 (concatenate), a specific resource (rendered MP4s in out/), concrete input and output paths (out/<slug>.mp4 -> out/<out_slug>.mp4), and the mechanism (FFmpeg). This is clearly distinguishable from siblings like render_deck or make_short_cutdown.

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

Usage Guidelines3/5

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

Usage is only implied: the mention of 'rendered videos' and 'existing video slugs in out/' suggests it runs after rendering individual clips, but the description never says 'use this when...' or names an alternative (e.g., versus make_short_cutdown). No explicit exclusions or preconditions beyond the failure list.

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