Skip to main content
Glama

analyze_audio_file

Read-onlyIdempotent

Analyze local audio files to measure loudness, true peak, format, and optional spectral, pitch, or note-event data before Ableton Live edits.

Instructions

Measure local source loudness, true peak, format, and optional spectrum, spectrogram, monophonic pitch or note events. A target note proposes a review-only whole-clip offset for stable monophonic windows; no edits or correction of changing notes. Loudness uses the source stream; optional analyses use the selected channel. Excludes Live processing. Requires ffmpeg/ffprobe.

Input Schema

NameRequiredDescriptionDefault
sourcePathYesAbsolute local audio file.
channelIndexNoSource channel for optional analyses; zero-based, default 0.
includePitchNoMonophonic channel pitch in overlapping 256-ms frames; requires 256+ ms.
startSecondsNoWindow start.
targetMidiNoteNoMIDI reference at A4=440 Hz; enables monophonic pitch analysis, not correction.
durationSecondsNoWindow duration, defaults to 10 seconds.
includeSpectrumNoOne 4096-sample spectral frame at window start.
includeWaveformNoUp to 1024 contiguous channel min/max/RMS buckets at 48 kHz.
includeTransientsNoChannel onset candidates at 10-ms resolution; not Live warp/slice markers.
includePitchEventsNoApproximate monophonic channel note events for review; no correction.
includeSpectrogramNoUp to 64 spectral frames at 48 kHz.
includeResonanceCandidatesNoNarrow spectral features persisting across 4+ frames; heuristic, not confirmed resonances or EQ advice.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.3.1
    • removedOutput schema / additionalProperties
      Removed value: -true
    • addedOutput schema / anyOf
      Added value: +[
      +  {
      +    "properties": {
      +      "channels": {
      +        "type": "integer"
      +      },
      +      "durationSeconds": {
      +        "type": "number"
      +      },
      +      "integratedLufs": {
      +        "anyOf": [
      +          {
      +            "type": "number"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ]
      +      },
      +      "loudnessRangeLu": {
      +        "anyOf": [
      +          {
      +            "type": "number"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ]
      +      },
      +      "sampleRate": {
      +        "type": "number"
      +      },
      +      "scope": {
      +        "const": "source_audio"
      +      },
      +      "sourcePath": {
      +        "type": "string"
      +      },
      +      "truePeakDbtp": {
      +        "anyOf": [
      +          {
      +            "type": "number"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ]
      +      },
      +      "window": {
      +        "properties": {
      +          "durationSeconds": {
      +            "type": "number"
      +          },
      +          "startSeconds": {
      +            "type": "number"
      +          }
      +        },
      +        "required": [
      +          "startSeconds",
      +          "durationSeconds"
      +        ],
      +        "type": "object"
      +      }
      +    },
      +    "required": [
      +      "sourcePath",
      +      "scope",
      +      "durationSeconds",
      +      "sampleRate",
      +      "channels",
      +      "window",
      +      "integratedLufs",
      +      "truePeakDbtp",
      +      "loudnessRangeLu"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "properties": {
      +      "error": {
      +        "properties": {
      +          "message": {
      +            "type": "string"
      +          },
      +          "outcome": {
      +            "enum": [
      +              "unknown",
      +              "not_executed"
      +            ]
      +          }
      +        },
      +        "required": [
      +          "message",
      +          "outcome"
      +        ],
      +        "type": "object"
      +      }
      +    },
      +    "required": [
      +      "error"
      +    ],
      +    "type": "object"
      +  }
      +]
  2. Changed10 schema fields changedv0.3.0
    • changedInput schema / properties / channelIndex / description
      Previous value: -"Zero-based source channel for waveform, spectrum, spectrogram and pitch; defaults to zero."New value: +"Source channel for optional analyses; zero-based, default 0."
    • changedInput schema / properties / includePitch / description
      Previous value: -"Estimate selected-channel monophonic pitch with overlapping 256-ms frames across the window; requires at least 256 ms."New value: +"Monophonic channel pitch in overlapping 256-ms frames; requires 256+ ms."
    • changedInput schema / properties / includePitchEvents / description
      Previous value: -"Group selected-channel monophonic pitch frames into approximate note events for review; no correction."New value: +"Approximate monophonic channel note events for review; no correction."
    • changedInput schema / properties / includeResonanceCandidates / description
      Previous value: -"Report heuristic persistent narrow spectral features across at least four sampled frames; not confirmed resonances or automatic EQ advice."New value: +"Narrow spectral features persisting across 4+ frames; heuristic, not confirmed resonances or EQ advice."
    • changedInput schema / properties / includeSpectrogram / description
      Previous value: -"Include up to 64 time-resolved spectral frames, resampled to 48 kHz."New value: +"Up to 64 spectral frames at 48 kHz."
    • changedInput schema / properties / includeSpectrum / description
      Previous value: -"Include one 4096-sample spectral frame at the window start."New value: +"One 4096-sample spectral frame at window start."
    • changedInput schema / properties / includeTransients / description
      Previous value: -"Find selected-channel source-audio onset candidates at 10-ms resolution; not Live warp/slice markers."New value: +"Channel onset candidates at 10-ms resolution; not Live warp/slice markers."
    • changedInput schema / properties / includeWaveform / description
      Previous value: -"Include up to 1024 contiguous selected-channel min/max/RMS waveform buckets at 48 kHz."New value: +"Up to 1024 contiguous channel min/max/RMS buckets at 48 kHz."
    • changedInput schema / properties / targetMidiNote / description
      Previous value: -"Measure monophonic cents deviation against this explicit MIDI note at A4=440 Hz; enables pitch analysis, not pitch correction."New value: +"MIDI reference at A4=440 Hz; enables monophonic pitch analysis, not correction."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "type": "object"
      +}
  3. Changed1 schema field changedv0.2.0
    • addedInput schema / properties / includePitchEvents
      Added value: +{
      +  "description": "Group selected-channel monophonic pitch frames into approximate note events for review; no correction.",
      +  "type": "boolean"
      +}
  4. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already cover the safe-read profile (readOnly, idempotent, non-destructive). The description adds genuinely new behavior: requires ffmpeg/ffprobe, loudness is measured on the source stream while optional analyses follow channelIndex, and pitch/offset output is advisory with no correction of moving notes.

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?

Dense but front-loaded: the measurement scope comes first, then caveats and the dependency. Dense and telegraphic in places but every clause carries information.

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 an output schema present, return values need not be explained; annotations cover safety. The description supplies the dependency requirement, channel semantics, and the analytical limits an agent needs to invoke this 12-param tool 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 100%, so baseline is 3, but the description adds meaning beyond the schema: it links targetMidiNote to a review-only whole-clip offset, and clarifies why channelIndex exists (optional analyses only, loudness stays on source).

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?

Opens with a specific verb (Measure) and enumerates the resources (loudness, true peak, format, spectrum, spectrogram, pitch, note events) on a local source file. 'Excludes Live processing' and 'local source' implicitly separate it from Live-object siblings like analyze_audio_clip, though no sibling is named.

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?

Explains that the target-note output is review-only and limited to stable monophonic windows, and clarifies the source-stream vs selected-channel split. It gives constraints but never states when to choose this over analyze_audio_clip or analyze_midi_parts.

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

Deploy Server

Other Tools