Skip to main content
Glama

mux_media

Combine or replace video and audio streams, offset audio timing, and use stream copy or replace/add mapping to create a muxed output file without re-encoding video.

Instructions

Combine or replace video and audio streams. Takes a video file and an audio track, with optional audio delay offset, stream-copy mode for zero quality loss, and 'replace' or 'add' stream mapping.

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

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 behavioral burden. It usefully discloses that stream-copy mode gives zero quality loss, that 'replace' drops existing video audio, and that 'add' keeps original audio as a secondary track. However, it omits critical mutation behavior such as whether outputPath is overwritten, what happens on failure, and whether external dependencies like ffmpeg are required.

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?

The description is a single, front-loaded sentence with no filler. It efficiently names the core action and then lists the key optional behaviors. It is appropriately sized, though the embedded list is slightly dense.

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-mutating tool with no annotations and no output schema, the description covers purpose and key options but leaves important context unspecified. It does not state whether the output file is overwritten, whether the tool returns the output path, or how errors are surfaced. These omissions matter for an agent invoking a write-style media operation.

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 all eight parameters are already documented in the schema. The description restates the optional audio delay, stream-copy mode, and replace/add mapping but adds no syntax, format, or edge-case meaning beyond what the schema already provides. Baseline 3 is appropriate when the schema does the heavy lifting.

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 states a specific verb and resource: combining or replacing video and audio streams by taking a video file plus an audio track. It is clear what the tool does, though it does not explicitly differentiate itself from siblings like concat_media or media_convert, 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: use this when you need to combine a video file with an audio track or replace/add an audio stream. However, there is no explicit when-to-use guidance, no when-not-to-use guidance, and no named alternatives, leaving the agent to infer selection against siblings like concat_media or media_convert.

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