Skip to main content
Glama

analyze_audio

Read-onlyIdempotent

Measure audio loudness, true peak, stereo phase, and band balance to verify and guide mixing in Ableton Live.

Instructions

Measure the audio itself: loudness, true peak, stereo phase and band balance.

Reads the LiveMaestro Analyzer Max for Live device over loopback OSC; without it this
reports device_not_found with the steps to load it.

- Loudness to EBU R128: momentary 400 ms, short term 3 s, gated integrated since
  reset, range.
- True peak, oversampled, with sample peak, RMS and the crest factor between them.
- Stereo correlation full band and below 120 Hz, and low-end survival of a mono sum.
- Seven band energies on the mono sum, and their weighted centre, not an FFT centroid.

The device reads at its position in the chain, so it belongs last: an effect
after it is not in the reading. A master chain sits before the master fader, so a
master reading matches the output only at 0.0 dB. The two peak figures are maxima
since the last reset and only rise: to measure one, call with
reset=true and no accumulate, let a pass of the material through, then call again.
The averaged figures need no reset. What it proves is what the signal measured
passing the device, not the room.

Every measurement carries the transport state from immediately after it, so a reading
taken mid scene change can be recognised. ``in_transition`` is true while any track
reports fired_slot_index 0 or more, a launch waiting for the next quantization boundary,
and ``tracks_sounding`` counts tracks whose playing_slot_index is 0 or more while the
transport runs, 0 when stopped: clips Live plays, not what is audible. Unreadable state
gives ``transport`` null with a code and one sentence in ``transport_unavailable``, or
not_queried when the analyzer did not answer.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
resetNoRestart the integrated loudness and loudness range before measuring, to integrate one section rather than everything since the audio engine started. The reply that performs the reset reports no integrated figure, because it had just begun. It applies to a call with no 'accumulate' at all: an accumulation samples the device on its own schedule, and accumulate='read' reports the windows already counted rather than taking a fresh measurement, so a call that passes both performs no reset.
trackNoWhich analyzer to read: a track name, a zero-based track index, 'master' for the main track, or '*' for whichever instance answers first. Every instance in the set answers every request, and the result lists them all under 'answered'. An index or 'master' costs one extra round trip, because the device reports the name of its track and the index is resolved against the set here.master
window_msNoHow far back the averaged measurements reach, in milliseconds. This governs the averaged figures alone: RMS, both correlations and the seven bands. Loudness keeps its own EBU windows and the peaks are maxima since the last reset. This looks backwards at audio that already played and returns immediately. It does not record for this long. The device buffers a fixed number of samples, so the window this reaches depends on the sample rate: about 2180 ms at 44.1 kHz and 1000 ms at 96 kHz. A longer request is clamped without complaint, so read window_ms back off the result rather than assuming the request was honoured.
accumulateNoAccumulate band occupancy and levels over multiple analysis windows. 'start' begins periodic background sampling; 'read' returns the accumulated occupancy percentages and averaged levels across all sampled windows, together with the span they were taken over; 'reset' stops and clears accumulation. Occupancy is a share of time, so it is reported on 'read' alone: a single call measures one window and reports none.
occupancy_threshold_dbNoThreshold in dB relative to the loudest band in each analysis window. A band is counted as occupied if its level is within this threshold of the loudest band. It takes effect on accumulate='start' alone, because that is where the counting happens: an accumulate='read' reports the threshold its own accumulation was started with, and a single call counts no occupancy at all.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / properties / accumulate
      Added value: +{
      +  "anyOf": [
      +    {
      +      "enum": [
      +        "start",
      +        "read",
      +        "reset"
      +      ],
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Accumulate band occupancy and levels over multiple analysis windows. 'start' begins periodic background sampling; 'read' returns the accumulated occupancy percentages and averaged levels across all sampled windows, together with the span they were taken over; 'reset' stops and clears accumulation. Occupancy is a share of time, so it is reported on 'read' alone: a single call measures one window and reports none.",
      +  "title": "Accumulate"
      +}
    • addedInput schema / properties / occupancy_threshold_db
      Added value: +{
      +  "default": 12,
      +  "description": "Threshold in dB relative to the loudest band in each analysis window. A band is counted as occupied if its level is within this threshold of the loudest band. It takes effect on accumulate='start' alone, because that is where the counting happens: an accumulate='read' reports the threshold its own accumulation was started with, and a single call counts no occupancy at all.",
      +  "title": "Occupancy Threshold Db",
      +  "type": "number"
      +}
    • changedInput schema / properties / reset / description
      Previous value: -"Restart the integrated loudness and loudness range before measuring, to integrate one section rather than everything since the audio engine started. The reply that performs the reset reports no integrated figure, because it had just begun."New value: +"Restart the integrated loudness and loudness range before measuring, to integrate one section rather than everything since the audio engine started. The reply that performs the reset reports no integrated figure, because it had just begun. It applies to a call with no 'accumulate' at all: an accumulation samples the device on its own schedule, and accumulate='read' reports the windows already counted rather than taking a fresh measurement, so a call that passes both performs no reset."
  2. Addedv0.1.1

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint, but the description adds far more: device dependency, monotonic peak behavior, placement effects, master fader dependency, and transport-state caveats including in_transition and tracks_sounding. It also discloses failure modes like device_not_found and transport null. No contradiction with annotations.

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?

The description is well structured: a one-line summary, a compact bullet list, then short paragraphs for device placement, reset procedure, and transport state. It is long but dense and mostly earns its length; a small deduction because the transport-state detail could be considered redundant if the output schema already documents those fields.

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 tool with this complexity, the description covers prerequisites, failure behavior, parameter interactions, placement constraints, reset workflow, and output interpretation. Combined with the annotations and output schema, it gives an agent everything needed to invoke the tool correctly and interpret the reading accurately.

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%, and each parameter already has rich semantic documentation. The prose adds workflow guidance like 'call with reset=true and no accumulate', but it does not materially expand parameter meaning beyond what the input schema already provides, which matches the high-coverage baseline of 3.

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 opens with a specific verb and object ('Measure the audio itself') and immediately enumerates the exact measurements: loudness, true peak, stereo phase, and band balance. This clearly differentiates it from sibling tools like get_session, describe, or get_track, which do not claim audio-signal measurement.

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?

The description gives strong operational context: it requires the LiveMaestro Analyzer device, reports device_not_found otherwise, must be placed last in the chain, and needs a reset-then-measure cycle for peak figures. It does not explicitly name alternative sibling tools or say when not to use it, 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.