Skip to main content
Glama

Get the audio waveform of a file

get_audio_waveform_of_file
Read-onlyIdempotent

Reduce an audio file to evenly spaced peak values for drawing waveforms or locating loud and quiet sections, with optional RMS levels and max peak data.

Instructions

Reduce a file's audio to a fixed number of peak values (0-1, where 1 is full scale) spread evenly over the analysed time, for drawing a waveform or reasoning about where the loud and quiet parts are. Point i covers the file time from analyzed_start + i * seconds_per_point. Each peak is the highest absolute sample of any channel (up to 8) in that slice. Also returns max_peak and max_peak_db. For exact silent ranges use detect_silence_in_file; for beats use detect_beats_in_file. Works on the file on disk with ffmpeg, not on the timeline; Premiere Pro is not needed. ffmpeg and ffprobe must be installed (see check_ffmpeg), else FFMPEG_NOT_FOUND.

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": {
      "path": "<path>"
    },
    "name": "get_audio_waveform_of_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
endNoAnalyse up to this file time, in seconds; clamped to the file's length. Must be greater than start. Default: the end of the file.
pathYesAbsolute path of the media file on this computer.
startNoAnalyse from this file time (seconds from the start of the file). Default 0.
pointsNoHow many values to return, 2-4000. Default 200.
include_rmsNoAlso return `rms`: the average (RMS) level 0-1 of each slice, which follows perceived loudness better than peaks. Default false.
audio_streamNoWhich audio stream to use, 0-based among the file's audio streams (see probe_media_file). Default 0.
timeout_secondsNoStop ffmpeg and fail with TIMEOUT after this many seconds. Default 600.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.6/5.0
Behavior4/5

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

Goes well beyond the annotations: it discloses that processing happens on the file on disk via ffmpeg, not on the timeline, that Premiere Pro is not required, that channels up to 8 are collapsed to absolute peaks, and names the failure mode FFMPEG_NOT_FOUND. What it does not cover is cost/pagination behavior for large point counts or resolution/runtime expectations, 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?

Front-loaded with the core purpose and output semantics, then alternatives, then environment prerequisites — a sensible ordering. The sentences are dense and long; a bulleted split for the alternative tools and the ffmpeg requirement would scan faster, but nothing is redundant.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 7-parameter read-only analysis tool with no output schema, the description supplies the return shape (peak array, max_peak, max_peak_db, optional rms), the point-to-time mapping, and the error case. That is everything an agent needs to call it correctly and interpret the result.

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; the description adds real semantic value by giving the indexing formula ('Point i covers the file time from analyzed_start + i * seconds_per_point') that links the `points` parameter to output slices, and by clarifying that each peak is the max absolute sample across channels. It doesn't add anything about `timeout_seconds` or `audio_stream` 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 and resource ('Reduce a file's audio to a fixed number of peak values') plus the output range (0-1), scale semantics, and intended uses. It explicitly distinguishes itself from detect_silence_in_file and detect_beats_in_file, so an agent can choose it without opening the schema.

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

Usage Guidelines5/5

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

Gives positive use cases (drawing a waveform, locating loud/quiet parts) and names two concrete alternatives with the condition that selects each ('exact silent ranges' vs 'beats'). It also states a hard prerequisite (ffmpeg/ffprobe, see check_ffmpeg), which is exactly the routing guidance an agent needs before calling.

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

Deploy Server

Other Tools