Skip to main content
Glama

Analyze audio: tempo (BPM) and peaks

vivid_analyze_audio
Read-only

Analyze an MP3/WAV for tempo, beat grid, and transient peaks to plan cuts and sync edits; returns BPM, beats/downbeats, and hit strengths.

Instructions

Tempo and transient analysis of a music / voice file, computed on the VIVID server (free, cached per asset). Returns bpm, firstBeatMs, the beat grid (beats[] / downbeats[] in ms from the start of the file, constant tempo) and peaks[] — the detected hits/accents/drops ({ms, strength 0–1}). Use beats for metronomic cuts and peaks for cuts on what the ear hears (dynamic montage, "tagli sui picchi"): pass them as clip boundaries (UPDATE_CLIP startMs/durationMs) or let CUT_TO_BEAT do it (grid beats|peaks). Input: VIVID asset id, public URL or local file (uploaded for you). MP3 or WAV only. First 90 s analysed by default.

Input Schema

NameRequiredDescriptionDefault
modeNoboth
sourceYesAsset id (32 hex chars), http(s) URL, or local MP3/WAV path.
bpmHintNoKnown tempo; fixes half/double-tempo detections. A "128 BPM" in the file name is picked up automatically.
minGapMsNoMinimum distance between two peaks (default 250 ms). Raise it (600–1500) for fewer, bigger accents.
maxSecondsNoSeconds analysed from the start (default 90).
sensitivityNo0 = only the strongest hits … 1 = every small transient (default 0.5).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.36.0

TDQS

A4.3/5.0
Behavior5/5

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

Annotations already declare readOnly/openWorld/non-destructive, and the description adds genuinely new context: computation happens server-side, it is free and cached per asset, local files are uploaded automatically, only MP3/WAV are accepted, and analysis is truncated to the first 90 s by default. These are operational traits an agent could not infer from the annotations or schema alone.

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?

A single dense paragraph, but front-loaded with purpose and output shape before moving to usage and input constraints; nearly every clause carries information. It is packed with nested parentheses and dashed asides, which costs some readability, but nothing is truly redundant.

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?

With no output schema, the description does the necessary work of enumerating return fields and their units (ms from file start, constant tempo, strength 0–1), plus format and length constraints. It is slightly incomplete on the mode parameter and on failure behavior (too-long or unsupported files), but an agent can call it correctly as written.

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 83%, so parameters like bpmHint, minGapMs, sensitivity and maxSeconds are already well documented in the schema. The description restates source types and the 90 s default but adds nothing about the 'mode' enum (bpm/peaks/both), which is the one parameter whose trade-off matters most here. Baseline 3 fits given the schema does the heavy lifting.

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?

Opens with a specific verb+resource: 'Tempo and transient analysis of a music / voice file'. It immediately enumerates the concrete outputs (bpm, firstBeatMs, beats[], downbeats[], peaks[]) so the agent knows exactly what it gets, and no sibling tool (transcribe, generate_music, search_sounds) overlaps with this analysis function.

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?

Gives explicit downstream guidance: 'Use beats for metronomic cuts and peaks for cuts on what the ear hears', and names the consuming tools (UPDATE_CLIP startMs/durationMs, CUT_TO_BEAT grid beats|peaks). What is missing is an explicit statement of when NOT to use it (e.g. for speech-to-text use vivid_transcribe instead), so it stops short of a 5.

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