Skip to main content
Glama

mux_media

Multiplex an audio track into a video file or combine separate video and audio streams, with options to replace or add audio and copy video without re-encoding.

Instructions

Multiplex (mux) an audio track into a video file or combine standalone video and audio streams. Supports replacing audio, mixing, and instantaneous stream copy without re-encoding video.

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": {
      "videoPath": "<videoPath>",
      "audioPath": "<audioPath>",
      "outputPath": "<outputPath>"
    },
    "name": "mux_media"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeNoMuxing mode: 'replace' drops existing video audio and uses new audio; 'add' keeps original audio and adds new audio as secondary track. Default: 'replace'.replace
shortestNoEnd output when the shorter input stream finishes. Default: true.
audioPathYesPath to the source audio file (.mp3, .wav, .aac, .m4a, etc.) to mux.
videoPathYesPath to the source video file.
outputPathYesTarget output video path (.mp4, .mov, or .mkv).
streamCopyVideoNoUse stream copy (-c:v copy) for instantaneous video multiplexing without quality loss. Default: true.
audioOffsetSecondsNoAudio delay or advance in seconds. Positive numbers delay audio; negative numbers advance it. Default: 0.
hardwareAccelerationNoUse hardware-accelerated video encoding when streamCopyVideo is false. Default: true.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.6.0

TDQS

A3.5/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 behavioral burden and does add real value by disclosing that stream copy is instantaneous and lossless ('without re-encoding video'). However, it omits key mutation behavior: whether outputPath is overwritten if it exists, what happens on codec/container mismatch, and whether hardware acceleration or re-encode degrades quality.

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 tight sentences: the primary operation is front-loaded, and the second sentence enumerates the supported variations without filler. Nothing is redundant with the title or restates the tool name pointlessly.

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 an 8-parameter, file-writing tool with no annotations and no output schema, the description covers purpose and the stream-copy behavior but says nothing about the output artifact (format guarantees, overwrite semantics, returned identifiers). The rich schema compensates for parameter-level gaps, leaving the description adequate but not complete.

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 every parameter including mode, audioOffsetSeconds, and streamCopyVideo is already documented in the schema. The description only loosely echoes 'replacing audio, mixing, and stream copy' without adding format or edge-case detail, so the 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?

The description gives a concrete verb-and-resource: 'Multiplex (mux) an audio track into a video file,' plus the broader case of 'combine standalone video and audio streams.' That is enough to distinguish it from siblings like extract_audio (opposite direction) or concat_media (joining like media), though it never explicitly contrasts itself with them.

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 stated capability ('replacing audio, mixing'), so an agent can infer this is the tool for attaching an audio track to a video. There is no explicit when-to-use/when-not guidance and no mention of alternatives such as extract_audio or concat_media, so routing must be inferred from the name and purpose.

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