Skip to main content
Glama

concat_media

Joins multiple video or audio files in sequence into one output, using stream copy for matching formats or re-encoding when they differ; supports dry-run planning and verification.

Instructions

Join multiple video or audio files in order into a single file. Uses stream copy for matching files or re-encodes when formats differ. Supports dryRun and post-flight verification.

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": {
      "inputPaths": "<inputPaths>",
      "outputPath": "<outputPath>"
    },
    "name": "concat_media"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeNoConcatenation mode. 'auto' (default) probes inputs to check codecs, resolutions, framerates, and audio sample rates, using fast stream copy if matching or falling back to re-encoding if they differ. 'lossless' forces stream copy. 'reencode' forces filtergraph normalization.auto
dryRunNoPlan-before-encode: returns planned FFmpeg command, parameters, and target output without writing files.
inputPathsYesList of media files to concatenate in sequential order
outputPathYesTarget output file path

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.7.1
    • addedInput schema / properties / dryRun
      Added value: +{
      +  "description": "Plan-before-encode: returns planned FFmpeg command, parameters, and target output without writing files.",
      +  "type": "boolean"
      +}
  2. Changed3 schema fields changedv0.6.2
    • changedInput schema / properties / mode / default
      Previous value: -"lossless"New value: +"auto"
    • changedInput schema / properties / mode / description
      Previous value: -"Concatenation mode. 'lossless' uses stream copy without quality loss (inputs must share codecs). 'reencode' normalizes differing resolutions/codecs."New value: +"Concatenation mode. 'auto' (default) probes inputs to check codecs, resolutions, framerates, and audio sample rates, using fast stream copy if matching or falling back to re-encoding if they differ. 'lossless' forces stream copy. 'reencode' forces filtergraph normalization."
    • changedInput schema / properties / mode / enum
      Previous value: -[
      -  "lossless",
      -  "reencode"
      -]New value: +[
      +  "auto",
      +  "lossless",
      +  "reencode"
      +]
  3. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations, the description carries the full burden; it does disclose the core behavioral trait (stream copy for matching inputs, re-encode otherwise) and adds 'post-flight verification', which is not in the schema. However, it omits important operational details: whether an existing outputPath is overwritten, what happens on mismatched inputs under 'lossless', and error/failure behavior.

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?

Three short sentences, front-loaded with the primary action, then the encoding strategy, then the optional features. The final sentence largely restates schema-covered capabilities (dryRun), keeping it just short of fully earning every sentence.

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

Completeness3/5

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

For a 4-parameter mutation tool with no annotations and no output schema, the description covers the encoding strategy but does not describe the normal (non-dryRun) return value or file-overwrite behavior. dryRun's return is explained only indirectly via the schema, leaving a gap an agent would want filled.

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 mode, dryRun, inputPaths, and outputPath are already fully documented with semantics and enum meanings. The description mentions dryRun and verification but adds no new meaning to any parameter, so the baseline of 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?

States a specific verb and resource ('Join multiple video or audio files in order into a single file'), and the phrase 'in order' signals concatenation rather than track muxing, which implicitly separates it from mux_media. No sibling is named explicitly, so it falls short of a 5.

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 implied by the verb: use this to combine files sequentially. The description explains the auto/lossless/reencode trade-off at a high level, but it never says when to prefer this over mux_media or media_convert, and gives no exclusions or prerequisites.

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