Skip to main content
Glama

Set gain

audio.set_gain
Idempotent

Volume of an audio clip (or a video clip's linked audio) in dB; keyframes ride it up and down. The preview is a waveform of the clip; with preview inline it also carries the measured loudness (preview.loudness), a link preview does not. Returns the edit result (see the server instructions).

Input Schema

NameRequiredDescriptionDefault
clip_idYesAn audio clip, or a video clip whose linked audio to change
gain_dbYesdB, -60 to 24; 0 leaves it as it is. Keyframes make a ride: the first key holds backward to the clip start, so a ride that begins part-way down must also key its starting level at frame 0 or the frames before it are changed too. A key past the clip end is stored as given, with no clamp and no warning. Two keys on one frame are refused
previewNoinline: image in the result; link: URI that renders on read; nonelink
timeline_idYesTimeline handle; every edit returns a new one

Output Schema

NameRequiredDescriptionDefault
parentYesTimeline handle; every edit returns a new one
changedYes
clip_idNo
previewYes
clip_idsNo
track_idNo
warningsYes
timeline_idYesTimeline handle; every edit returns a new one

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / gain_db / description
      Previous value: -"dB, -60 to 24; 0 leaves it as it is; keyframes for rides"New value: +"dB, -60 to 24; 0 leaves it as it is. Keyframes make a ride: the first key holds backward to the clip start, so a ride that begins part-way down must also key its starting level at frame 0 or the frames before it are changed too. A key past the clip end is stored as given, with no clamp and no warning. Two keys on one frame are refused"
  2. Changed1 schema field changed
    • changedInput schema / $defs / Animatable / anyOf
      Previous value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "properties": {
      -      "keyframes": {
      -        "description": "frame is relative to the clip start; ease from video://catalog/eases",
      -        "items": {
      -          "properties": {
      -            "ease": {
      -              "type": "string"
      -            },
      -            "frame": {
      -              "maximum": 100000000,
      -              "minimum": -1000000,
      -              "type": "integer"
      -            },
      -            "value": {
      -              "type": "number"
      -            }
      -          },
      -          "required": [
      -            "frame",
      -            "value"
      -          ],
      -          "type": "object"
      -        },
      -        "maxItems": 1000,
      -        "minItems": 1,
      -        "type": "array"
      -      }
      -    },
      -    "required": [
      -      "keyframes"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "type": "number"
      +  },
      +  {
      +    "properties": {
      +      "keyframes": {
      +        "description": "frame is from the clip start; ease shapes the move from this keyframe to the next (default linear; hold waits, then jumps)",
      +        "items": {
      +          "properties": {
      +            "ease": {
      +              "enum": [
      +                "linear",
      +                "hold",
      +                "smooth",
      +                "sine_in",
      +                "sine_out",
      +                "sine_in_out",
      +                "quad_in",
      +                "quad_out",
      +                "quad_in_out",
      +                "cubic_in",
      +                "cubic_out",
      +                "cubic_in_out",
      +                "quart_in",
      +                "quart_out",
      +                "quart_in_out",
      +                "quint_in",
      +                "quint_out",
      +                "quint_in_out",
      +                "expo_in",
      +                "expo_out",
      +                "expo_in_out",
      +                "circ_in",
      +                "circ_out",
      +                "circ_in_out",
      +                "back_in",
      +                "back_out",
      +                "back_in_out",
      +                "elastic_in",
      +                "elastic_out",
      +                "elastic_in_out",
      +                "bounce_in",
      +                "bounce_out",
      +                "bounce_in_out"
      +              ],
      +              "type": "string"
      +            },
      +            "frame": {
      +              "maximum": 100000000,
      +              "minimum": -1000000,
      +              "type": "integer"
      +            },
      +            "value": {
      +              "type": "number"
      +            }
      +          },
      +          "required": [
      +            "frame",
      +            "value"
      +          ],
      +          "type": "object"
      +        },
      +        "maxItems": 1000,
      +        "minItems": 1,
      +        "type": "array"
      +      }
      +    },
      +    "required": [
      +      "keyframes"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
  3. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare the safety profile (readOnly=false, destructive=false, idempotent=true, openWorld=false), so the bar is lower, and the description still adds context they don't carry: that inline previews include measured loudness while link previews do not, and that the call returns an edit result. It does not cover permissions or what an undo looks like, keeping it short of a 5.

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?

Three compact sentences, front-loaded with the core effect (dB on a clip) before preview and return details. Slightly fragmentary opening but nothing is padding.

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?

An output schema exists, so the description only needs to gesture at the return value, which it does by pointing to the edit result and server instructions. For a 4-parameter mutation with full schema coverage and annotations, the remaining gap is minor.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds meaning the schema lacks: that keyframes make the gain 'ride' over time, and that inline previews surface preview.loudness that link previews do not. That is genuine value beyond the field descriptions.

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 the specific resource and property (gain in dB on an audio clip, or a video clip's linked audio) and distinguishes the two clip kinds it accepts, which separates it from audio.set_master and audio.set_pan. It is phrased as a noun fragment rather than a verb, but the operation is unambiguous to an agent.

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 scope statement (clip-level audio, not master or pan), but the description never says when to prefer this over audio.set_master, audio.set_pan, or audio.fade, all of which live in the same namespace. No exclusions or prerequisites are stated.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.