Skip to main content
Glama

media_audio

Prepares audio from WAV, MP3, or video soundtracks and extracts loudness, true peak, and sound/silence spans for precise timing and Gemini media analysis.

Instructions

Audio prep and stats from wav / mp3 / a video's sound track (local ffmpeg; no model).

Writes audio.wav (mono 16 kHz, small enough for gemini_analyze_media), wave.png, spectrum.png (both readable by you) and stats.json. Returns loudness (LUFS, true peak) and sound / silence spans in source seconds; silences match utterance breaks closely, so use these spans for exact times rather than the times a model reports.

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": {
      "src_path": "<src_path>"
    },
    "name": "media_audio"
  }
}

Input Schema

NameRequiredDescriptionDefault
endNo
startNo
out_dirNo
src_pathYes
session_idNo
silence_dbNo
silence_minNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations at all, the description carries the full burden and does disclose substantial behavior: disk artifacts written (audio.wav mono 16 kHz, wave.png, spectrum.png, stats.json), the returned measurements (LUFS, true peak, sound/silence spans in source seconds), and that processing is local with no model cost. It is silent on overwrite behavior in out_dir, failure modes for unsupported containers, and runtime characteristics, which matter for a file-writing operation with zero annotation coverage.

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?

Four tight lines with no filler: implementation constraint front-loaded, then output artifacts, then return values, then the comparative guidance about timestamp accuracy. Density is high but no sentence is wasted; the trade-off is that parameter guidance was dropped entirely in favor of behavioral detail.

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 a 7-parameter tool with 0% schema coverage and no output schema, the description covers what is produced on disk and what is returned, which is the hardest part to infer. It is incomplete on the parameter surface, leaving six optional parameters with no described effect, so an agent must guess at trimming and silence-sensitivity semantics.

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 0% across 7 parameters, so the description must compensate and it largely does not: start/end trimming, silence_db (-35 default) and silence_min (0.25 default) thresholds, out_dir, and session_id are never explained or given units/format guidance. The only partial compensation is the phrase 'spans in source seconds', which implies the time coordinates are source-relative rather than clipped to the start offset.

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?

States a concrete pair of actions (audio prep and stats) on a specific resource set (wav / mp3 / a video's sound track) and pins the implementation constraint ('local ffmpeg; no model'). This distinguishes it from the model-based sibling gemini_analyze_media, though the compound 'prep and stats' framing leaves two capabilities bundled without separate explanation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides a clear routing rule: it produces audio.wav 'small enough for gemini_analyze_media', establishing the preparatory relationship, and explicitly says to use its silence spans for exact times 'rather than the times a model reports'. It does not state when not to use it (e.g. already-prepared audio or pure video needs), so it stops short of full when/when-not coverage.

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