Skip to main content
Glama

audio.mix

Combine a video's voice track with background music and automatically lower the music under speech using sidechain ducking, with optional fades.

Instructions

Mix a video's voice track with background music, ducking the music under the voice with a sidechain compressor. Video is kept (stream copy); audio is re-encoded. Fades optional.

Input Schema

NameRequiredDescriptionDefault
duckNoSidechain-compressor ducking keyed on the voice (dB threshold, ratio, attack/release in ms)
musicYesBackground music file
videoYesVideo file whose audio track is the voice
fadeInNoFade-in duration in seconds (default 0)
outputYesPath to write the mixed file
fadeOutNoFade-out duration in seconds (default 0)
musicGainDbNoGain applied to the music in dB before ducking

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the burden and does so usefully: it discloses that the video stream is copied (not re-encoded) while audio is re-encoded, which is exactly the kind of behavioral fact an agent needs. It omits overwrite semantics for the output path, supported formats/codecs, and what happens if the video has no audio track.

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?

Three short sentences, front-loaded with the core operation, then the stream-handling detail, then the optional features. Every sentence earns its place with zero filler.

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 7-parameter tool with a nested object and no annotations or output schema, the description explains the mechanism and the container/codec trade-off well. It stops short on the return value and on error/overwrite behavior for the output path, which matters since no output schema exists.

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 seven parameters including the nested duck object are already documented. The description adds only the concepts of ducking and optional fades, which the schema already covers in more detail; it provides no extra syntax, ranges, or defaults beyond the schema.

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?

States a specific verb (mix), the exact resources involved (a video's voice track plus background music), and the mechanism (sidechain-compressor ducking). This is clearly distinguishable from sibling audio tools like audio.loudnorm (normalization) and audio.measure (analysis).

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 intent — combine voice with music under ducking — is implied clearly, but there is no explicit when-to-use/when-not guidance and no reference to the sibling audio tools it could be confused with (e.g. audio.loudnorm for leveling without a music bed). Nothing tells the agent when to prefer this over a loudnorm-plus-mix sequence.

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