Skip to main content
Glama

Merge Audio into Video

merge_audio
Destructive

Merge a video and audio file into a single output, copying the video stream and encoding audio as AAC. Optionally loop short audio and apply loudness normalization.

Instructions

Combine a video file and an audio file into one output file. The video stream is copied without re-encoding; audio is encoded to AAC at the given bitrate. Loops audio shorter than the video when loop is true, and can apply loudness normalization (ffmpeg loudnorm) for YouTube-style targets. Prerequisite: ffmpeg installed. Side effect: overwrites output_path if it already exists.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
loopNoLoop the audio if it is shorter than the video. Default true.
bitrateNoAudio bitrate in kbps, 8-1024. Default 320.
normalizeNoApply loudness normalization (loudnorm I=-22 TP=-2 LRA=7). Default false.
audio_pathYesInput audio file path. Must exist.
video_pathYesInput video file path. Must exist.
output_pathYesOutput file path. Overwritten if it already exists.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
loopedYesTrue when audio looping was enabled
audioPathYesAbsolute input audio path
videoPathYesAbsolute input video path
normalizedYesTrue when loudness normalization was applied
outputPathYesAbsolute output file path
bitrateKbpsYesAudio bitrate applied, in kbps

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.5.2

TDQS

A4.3/5.0
Behavior5/5

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

Beyond the destructiveHint annotation, the description explicitly states the side effect of overwriting the output path, plus details on stream copying, audio encoding, looping, and normalization. It also notes the ffmpeg prerequisite, providing full behavioral transparency.

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?

Concise, with the main purpose stated first and all key behaviors summarized in a few sentences. No irrelevant details.

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

Completeness5/5

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

The description covers the essential behaviors: input merging, stream handling, side effects, prerequisites, and optional flags. Given that an output schema exists, return value details need not be included. The description is complete for an agent to decide and invoke correctly.

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?

The schema already covers all parameters with clear descriptions (100% coverage). The description adds minor context (e.g., AAC encoding and looping behavior) but largely overlaps with the schema, so no significant additional meaning is provided.

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?

Clearly states the tool combines a video and audio file into an output, with specific verbs and resources. This distinguishes it from sibling tools like render_video or concat_videos.

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?

The description explains what the tool does but does not explicitly give when to use it versus alternatives or when not to use it. It mentions conditions like looping and normalization but no comparative guidance.

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