Skip to main content
Glama

audio_onsets

Detects sound onsets with timestamps and strength plus beat BPM and first beat, helping align video edits to audio.

Instructions

Where sounds start (time, strength 0..1) and the beat (BPM, first beat).

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": {
      "script": "<script>"
    },
    "name": "audio_onsets"
  }
}

Input Schema

NameRequiredDescriptionDefault
minNothe weakest strength listed; 0 lists every onset (default: 0.1)
nowNothe wall clock at the video's first frame (Lua: f.now, seconds since 1970): an RFC 3339 time with its zone (2026-11-02T14:05:00Z, 2026-11-02T15:05:00+01:00) or seconds since 1970; preview --live runs on the system clock instead (default: 0, 1970-01-01T00:00:00Z)
setNoscript arguments (Lua: arg.K, a string) that also set props.K (a number when it looks like one); they win over a batch row, which wins over the props file
mediaNofonts, images and sounds (default: media/ beside the script)
propsNoa JSON object the script reads as the table props (props.title, ...)
rangeNoframes a..b (end exclusive), a.., ..b, all, or a scene name; times like 3.2s, 1:05.5, 50%, Intro@1.5s, a cue: drop, drop@0.5s (default: all)
scaleNooutput resolution factor, e.g. 0.5 for half resolution (rounded to an even size)
trackNoone track (its file name) or bus alone, as it sounds in the mix
scriptYesthe video script (.lua)
softwareNodraw on the CPU instead of the GPU

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full behavioral burden, and it discloses almost nothing: no indication of cost/runtime, whether it analyzes an existing render or triggers one, side effects, or error conditions. The only behavioral hints are the return-field semantics, which is thin for a script-driven analysis tool.

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 compact sentence that front-loads the core concept and packs in the return fields without filler. It is efficient, though the telegraphic phrasing ('Where sounds start') costs a little clarity.

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

Completeness2/5

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

For a 10-parameter, script-based tool with no output schema, the description should at least say what input audio is analyzed and how the beat/onset results relate to the track and range parameters. It covers the return fields but leaves the operational context (source of audio, whether a render is needed) entirely unaddressed.

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% with 10 documented parameters, so the schema already explains min, range, track, now, and the rest in detail. The description adds no parameter-level meaning (e.g., how 'track' or 'min' affect the returned onsets), so the baseline 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 names the resource (audio onsets) and enumerates the returned values — onset time, strength 0..1, BPM, and first beat — so an agent knows this extracts timing/beat information. The verb is implicit ('where sounds start') and nothing distinguishes it from siblings like audio_analyze or audio_parts, so it stops short of a 5.

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

Usage Guidelines2/5

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

There is no guidance on when to choose this over audio_analyze, audio_at, or audio_parts, nor any prerequisite (e.g., whether the script must be rendered first or which track is examined). The agent must infer usage entirely from the tool name and sibling list.

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