Skip to main content
Glama
libsonare-mcp

libsonare-mcp

Official
by libraz

Measure loudness (LUFS, true peak)

audio_loudness
Read-only

Measures integrated, short-term, and momentary loudness, LRA, true peak, and stereo/band balance, then previews streaming and broadcast gain targets to check a master against delivery standards.

Instructions

Measures loudness the way delivery standards do: integrated, momentary and short-term LUFS, loudness range (LRA), true peak, sample peak, crest factor, stereo correlation and width, a low/mid/high band balance measured at the file's own sample rate, and eight streaming and broadcast previews (Spotify, Apple Music, YouTube, Amazon Music, Tidal, Deezer, EBU R128, podcast) with the gain each would apply and any true-peak ceiling risk. Use it to check a master against a target, to see loudness over time with 'resolution', or after audio_master. Do not use it for general file facts (audio_info) or to change the level (audio_master, audio_edit). Example: {"path": "master.wav", "platforms": ["spotify", "appleMusic"], "resolution": "coarse"}.

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": {
      "path": "<path>"
    },
    "name": "audio_loudness"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesAudio file to measure (mono or stereo).
rangeNoAnalyze only this window ({start_sec, end_sec}, in seconds); times in the result stay on the file's own timeline. Omit for the whole file.
detailNo'concise' returns the summary and the most useful fields; 'full' returns all.concise
platformsNoStreaming/broadcast targets to preview: spotify, appleMusic, youtube, amazonMusic, tidal, deezer, broadcastR128, podcast. Omit for all eight. Each row carries the service's target_lufs and ceiling_dbtp, which audio_master takes as is; its 'platform' names delivery classes (streaming, broadcast, ...) instead.
resolutionNoTime-series density: none returns summary statistics only; coarse 0.5, medium 1 and fine 4 points per second return a list of points with time_sec and the measured value.none

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already establish readOnlyHint=true and openWorldHint=false, so the safety burden is light. The description nevertheless adds real behavioral content beyond them: the band balance is computed at the file's own sample rate, and each platform row carries the gain that would be applied plus a true-peak ceiling risk flag. What it does not cover is cost/runtime on long files or how the analysis handles very short or silent input.

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 output inventory is front-loaded, guidance and exclusions follow, and the example closes it out. The first sentence is a very long serial list that duplicates the platform enum already present in the schema, costing some density, but no sentence is filler.

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-shape burden and does so: it names the metric families and explains that platform rows include target_lufs, ceiling_dbtp, applied gain, and ceiling risk. It stops short of describing result structure (e.g. how time-series points are shaped, or what 'concise' versus 'full' drops), which the detail parameter only implies.

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 coverage is 100%, so every parameter is already documented, including the platform enum and resolution densities. The description adds only marginal semantics beyond that: the 'resolution' parameter is tied to the 'see loudness over time' use case, and the example shows a valid platforms+resolution composition. That is helpful but not a substitute-level contribution, so the baseline 3 applies.

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 (measures loudness) and enumerates the exact metrics returned: integrated/momentary/short-term LUFS, LRA, true peak, sample peak, crest factor, correlation/width, band balance, and eight platform previews. An agent can distinguish this from audio_info, audio_master, and audio_analyze on the strength of that enumeration alone.

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

Usage Guidelines5/5

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

It gives three concrete use cases (checking a master against a target, seeing loudness over time via 'resolution', verifying after audio_master) and explicit exclusions with the sibling that owns each: audio_info for general file facts, audio_master/audio_edit for changing level. Alternatives are named by condition, not just listed.

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