Skip to main content
Glama

Add or mix video audio

video_add_audio
Destructive

Add, replace, or mix an audio track into a video and render a new file while leaving source media untouched.

Instructions

Add, replace, or mix an audio track into a video and render a new file; the sources are only read. Returns JSON {success, output_path}.

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": {
      "video_path": "<video_path>",
      "audio_path": "<audio_path>"
    },
    "name": "video_add_audio"
  }
}

Input Schema

NameRequiredDescriptionDefault
mixNoTrue mixes the new audio with existing video audio; false replaces the original audio track.
volumeNoAudio gain from 0.0 to 2.0, where 1.0 preserves original loudness.
fade_inNoNon-negative fade-in duration in seconds applied to the inserted audio.
fade_outNoNon-negative fade-out duration in seconds applied near the inserted audio end.
overwriteNoAllow replacing existing media files.
audio_pathYesAbsolute path to an existing local audio file such as MP3, WAV, M4A, or AAC.
start_timeNoOptional start offset in seconds where the inserted audio begins.
video_pathYesAbsolute path to an existing local video file. The input file is read only.
output_pathNoDestination video path. Auto-generated when omitted; an existing supplied path may be overwritten.
duration_policyNoHow to reconcile audio and video length: keep_video (default, preserves the full video/outro), pad_audio, loop_audio, trim_audio, or shortest (may trim the outro).keep_video

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed13 schema fields changedv2.0.0
    • removedInput schema / properties / audio_path / title
      Removed value: -"Audio Path"
    • removedInput schema / properties / duration_policy / title
      Removed value: -"Duration Policy"
    • removedInput schema / properties / fade_in / title
      Removed value: -"Fade In"
    • removedInput schema / properties / fade_out / title
      Removed value: -"Fade Out"
    • removedInput schema / properties / mix / title
      Removed value: -"Mix"
    • removedInput schema / properties / output_path / title
      Removed value: -"Output Path"
    • changedInput schema / properties / overwrite / description
      Previous value: -"Explicitly allow replacing existing media. Existing non-media files are protected."New value: +"Allow replacing existing media files."
    • removedInput schema / properties / overwrite / title
      Removed value: -"Overwrite"
    • removedInput schema / properties / start_time / title
      Removed value: -"Start Time"
    • removedInput schema / properties / video_path / title
      Removed value: -"Video Path"
    • removedInput schema / properties / volume / title
      Removed value: -"Volume"
    • removedInput schema / title
      Removed value: -"video_add_audioArguments"
    • removedOutput schema / title
      Removed value: -"video_add_audioDictOutput"
  2. Changed1 schema field changedv1.16.4
    • addedInput schema / properties / overwrite
      Added value: +{
      +  "default": false,
      +  "description": "Explicitly allow replacing existing media. Existing non-media files are protected.",
      +  "title": "Overwrite",
      +  "type": "boolean"
      +}
  3. Changed2 schema fields changedv1.16.0
    • addedInput schema / additionalProperties
      Added value: +false
    • addedInput schema / properties / duration_policy
      Added value: +{
      +  "default": "keep_video",
      +  "description": "How to reconcile audio and video length: keep_video (default, preserves the full video/outro), pad_audio, loop_audio, trim_audio, or shortest (may trim the outro).",
      +  "title": "Duration Policy",
      +  "type": "string"
      +}
  4. Changed8 schema fields changedv1.5.1
    • addedInput schema / properties / audio_path / description
      Added value: +"Absolute path to an existing local audio file such as MP3, WAV, M4A, or AAC."
    • addedInput schema / properties / fade_in / description
      Added value: +"Non-negative fade-in duration in seconds applied to the inserted audio."
    • addedInput schema / properties / fade_out / description
      Added value: +"Non-negative fade-out duration in seconds applied near the inserted audio end."
    • addedInput schema / properties / mix / description
      Added value: +"True mixes the new audio with existing video audio; false replaces the original audio track."
    • addedInput schema / properties / output_path / description
      Added value: +"Destination video path. Auto-generated when omitted; an existing supplied path may be overwritten."
    • addedInput schema / properties / start_time / description
      Added value: +"Optional start offset in seconds where the inserted audio begins."
    • addedInput schema / properties / video_path / description
      Added value: +"Absolute path to an existing local video file. The input file is read only."
    • addedInput schema / properties / volume / description
      Added value: +"Audio gain from 0.0 to 2.0, where 1.0 preserves original loudness."
  5. First observedv0.2.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already flag destructiveHint=true and non-idempotency; the description adds genuinely new context by clarifying that source files are only read and that a new file is rendered, which tells the agent the destructive risk is confined to outputs. It does not call out overwrite behavior explicitly, but the schema does.

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?

A single front-loaded sentence covering action, modes, input safety, and return shape, with zero redundant wording.

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 10-parameter mutation tool, the description plus rich schema plus annotations plus an output schema covers what an agent needs. The only remaining gap is mode-selection guidance relative to sibling tools.

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 ten parameters including mix, volume, fades, start_time, and duration_policy are already documented. The description adds no syntax, defaults, or format meaning beyond that, 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?

The description names a specific verb set (add, replace, mix), the resource (an audio track into a video), and the outcome (render a new file). It is easy to separate from siblings like video_add_text or video_merge, but it never explicitly contrasts with them, so it stops 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?

The three modes (add/replace/mix) imply when the tool applies, but there is no explicit guidance on when to pick this tool over video_merge, video_edit_ops, or audio_ops, and no stated prerequisites or exclusions.

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