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, at about 1.5 credits a minute of it, billed by the second, and its beats replace the grid's beats in that range while the grid keeps the rest. 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.5/5.0
Behavior5/5

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

Annotations only say readOnlyHint=false and destructiveHint=false; the description goes far beyond that by disclosing the side effect (a stored grid whose beats are replaced in the given range), the credit cost model (free for ≥8s audio, ~1.5 credits/minute billed per second for video/short audio), and the exact return payload per mode. This is exactly the kind of behavior an agent cannot infer from the structured fields.

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 purpose and return list are correctly front-loaded, but the middle is a dense run-on packing mode, cost, replacement behavior and return fields into one sentence, and 'null for both reads the whole file' restates what the schema already says. It is informative but harder to parse than it needs to be.

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?

With no output schema, the description carries the full burden of describing returns and does so thoroughly for both modes (beats/downbeats/sections/hits/fills, plus big hits, drops and per-second loudness for audio). Combined with cost and grid-replacement behavior, an agent has everything needed to call it correctly.

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% and already documents startTime/endTime, but the description adds real meaning: the range selects only what is read, null/null reads the whole file, times are seconds into the asset, and the range semantics differ between the free long-audio path and the billed range path. It also ties the parameters to downstream use ('pass the source range the shots you build use' and 'Bind with beats= in film props').

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 names a specific verb and resource ('Detect beats and bars in ready music or video; stores the grid') and immediately enumerates what the result contains (beat times, downbeats, sections, drum hits, fills). That scope makes it unmistakably distinct from siblings like detect_scenes or detect_geometry without needing to name them.

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 an explicit precondition, 'Do this before cutting to music,' and explains the two operating modes (long sound file vs. video/short sound with a range). It stops short of naming an alternative tool or a when-not-to-use case, which keeps it below a 5.

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.