Skip to main content
Glama

Detect beats

detect_beats

Detect beats and bars in ready music or video; stores the grid. Returns the beat times, the downbeats (bar starts), the sections (intro, build, drop, breakdown, outro), the drum hits between beats and the fills (quick runs of hits into the next bar). Do this before cutting to music. A sound file of 8 seconds or more is measured from its sound: its answer also has the big hits (where the music slams in), the drops and the loudness of each second, uses no credits, and with startTime and endTime gives that range of it. For a video's sound or a shorter sound, pass startTime and endTime with the source range the shots you build use: only that range is read, and its beats replace the grid's beats in that range while the grid keeps the rest. It uses no extra credits. Times stay seconds into the asset. null for both reads the whole file. Bind with beats= in film props.

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": {
      "assetId": "<assetId>",
      "startTime": "<startTime>",
      "endTime": "<endTime>",
      "projectId": "<projectId>"
    },
    "name": "detect_beats"
  }
}

Input Schema

NameRequiredDescriptionDefault
assetIdYes
endTimeYesSource second to stop reading at, or null for the asset's end. null for both reads the whole asset.
projectIdYesThe project this call runs on without changing the open project. null (or leaving it out) uses the open project. wait_for_jobs takes the projectId of the calls that started the jobs.
startTimeYesSource second to start reading at, or null for the asset's start. Pass the range of the shot you build.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false and destructiveHint=false, and the description corroborates this by saying the grid is stored rather than merely returned. It adds real behavior beyond annotations: no credits consumed, extra per-second loudness and drop data for long sound files, and a merge rule where range beats replace grid beats only inside that range. The merge explanation is embedded in a long conditional sentence, which makes the dual-mode behavior harder to parse than it should be.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The content is dense and useful, but the prose rambles: the credit cost is stated twice ('uses no credits' and 'It uses no extra credits'), and the sound-vs-video conditional is one unwieldy run-on sentence. The most important instruction (run before cutting to music) sits in the middle rather than being 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?

With no output schema, the description carries the return-value burden and does so thoroughly by listing beats, downbeats, sections, drum hits, fills, drops, and per-second loudness. Given four required parameters and a stateful grid write, this is close to complete; only the exact grid-identity semantics (what 'the grid' attaches to) remain slightly underspecified.

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 75%, so startTime and endTime are already documented, but the description adds unit semantics ('Times stay seconds into the asset'), the null-for-both-reads-whole-file rule, and the crucial consequence that a supplied range overwrites the grid's beats only within that range. That is meaning beyond the schema. assetId is never discussed, but its role is obvious.

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?

The description states a specific verb and resource ('Detect beats and bars in ready music or video') and immediately names the durable side effect ('stores the grid'). It also enumerates what the answer contains (beats, downbeats, sections, drum hits, fills), which lets an agent distinguish this from sibling detectors like detect_scenes or detect_geometry without opening a schema.

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?

It gives explicit timing guidance — 'Do this before cutting to music' — and splits usage into two cases: sound files of 8s or more read the whole file, while video sound or shorter sounds require startTime/endTime. It does not name an alternative tool for agents who want scene rather than musical structure, so it falls short of a full when/when-not/alternative treatment.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.