Skip to main content
Glama

extract_audio

Extract an audio track from a video into a standalone file, including 16kHz mono WAV for speech recognition, MP3, AAC, FLAC, or stream copy, with output verification.

Instructions

Extract an audio track from a video file into a standalone audio file. Supports the 'whisper_wav' preset (16kHz mono WAV) for speech recognition models, plus MP3, AAC, FLAC, and stream copy. Automatically verifies output properties.

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": {
      "inputPath": "<inputPath>",
      "outputPath": "<outputPath>"
    },
    "name": "extract_audio"
  }
}

Input Schema

NameRequiredDescriptionDefault
formatNoAudio format: 'whisper_wav' (16kHz mono WAV for Whisper), 'mp3', 'aac', 'flac', or 'copy' (extract without re-encoding). Default: 'mp3'.
bitrateNoTarget audio bitrate for MP3 or AAC (e.g. '128k', '192k', '320k').
inputPathYesPath to the source video or audio file.
outputPathYesDestination path for the output audio file (e.g. './extracted.wav' or './audio.mp3').

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.5.0
    • changedInput schema / properties / format / description
      Previous value: -"Audio format: 'whisper_wav' (16kHz mono WAV for Whisper), 'mp3', 'aac', 'flac', or 'copy' (extract without re-encoding)."New value: +"Audio format: 'whisper_wav' (16kHz mono WAV for Whisper), 'mp3', 'aac', 'flac', or 'copy' (extract without re-encoding). Default: 'mp3'."
  2. Changed4 schema fields changedv0.4.2
    • changedInput schema / properties / bitrate / description
      Previous value: -"Audio bitrate, e.g. '192k', '320k' (for mp3/aac)"New value: +"Target audio bitrate for MP3 or AAC (e.g. '128k', '192k', '320k')."
    • changedInput schema / properties / format / description
      Previous value: -"Audio format preset. 'whisper_wav' generates 16kHz mono PCM. 'copy' extracts audio without re-encoding."New value: +"Audio format: 'whisper_wav' (16kHz mono WAV for Whisper), 'mp3', 'aac', 'flac', or 'copy' (extract without re-encoding)."
    • changedInput schema / properties / inputPath / description
      Previous value: -"Path to the input video file"New value: +"Path to the source video or audio file."
    • changedInput schema / properties / outputPath / description
      Previous value: -"Destination audio file path (e.g. ./audio.mp3, ./audio.wav)"New value: +"Destination path for the output audio file (e.g. './extracted.wav' or './audio.mp3')."
  3. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full disclosure burden. It does add genuine behavioral context that structured fields lack — that 'copy' extracts without re-encoding and that output properties are 'automatically verified' — but it says nothing about overwrite behavior when outputPath exists, failure modes for a missing audio stream, or what the verification actually reports.

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, each earning its place: the core action first, then format support with the special preset called out, then the verification trait. Nothing is redundant and the most decision-relevant information is front-loaded.

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 four-parameter tool with full schema coverage and no output schema, the description covers the operation, the format options, and a notable post-processing behavior. The remaining gap is minor: without annotations, a statement about overwrite/permission behavior would close the loop on the mutation side.

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 four parameters are already documented, including the format enum and default. The description reinforces the whisper_wav preset semantics and lists the supported formats, but adds little syntax or constraint detail beyond what the schema states. 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 leads with a specific verb and resource: 'Extract an audio track from a video file into a standalone audio file.' That is unambiguous about the operation and its inputs/outputs. It does not, however, differentiate itself from plausible siblings like media_convert, so an agent must infer the boundary itself.

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 context is implied rather than stated: the 'whisper_wav' preset is framed as the choice 'for speech recognition models,' which tells an agent when to pick that format. There is no explicit when-to-use vs. an alternative tool, no guidance on when stream copy is preferable to re-encoding beyond the parenthetical, and no exclusions.

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