Skip to main content
Glama
libsonare-mcp

libsonare-mcp

Official
by libraz

Compare audio files

audio_compare
Read-only

Compares 2-8 audio files for loudness, tonal balance, tempo and key, and reports differences, delay and null residual against the first file; also matches a mix to a reference track.

Instructions

Compares 2 to 8 audio files: loudness (LUFS, true peak), band balance, tempo and key per file, then the differences against the first file, the time offset between them and a null residual (what is left after matching loudness and aligning the delay, so a value near silence means the files are the same audio). In reference mode it takes exactly two files and runs the full reference analysis (loudness match, tonal balance, match-EQ curve, delay) of the second against the first, as when checking a mix against a reference track or an original against a mastered copy, and can write a level-matched blend of the two (write_ab) for listening. Mode align gives the anchors that place a take under a reference, and mode similarity shows how well the second file matches each stretch of the first; both read chroma, so pitch content only. Do not use it for one file (audio_info, audio_loudness) or to change anything (audio_master matches a reference). Example: {"paths": ["reference.wav", "mix.wav"], "mode": "reference"}.

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": {
      "paths": "<paths>"
    },
    "name": "audio_compare"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeNo'summary': meters, band balance, tempo and key per file plus differences, time offset and null residual against the first file. 'reference': exactly two files; runs the five reference pair analyses (loudness match, tonal balance, log-band balance, match-EQ curve, delay) of the second file against the first. 'align': exactly two files; anchors that place the second (a take) under the first one's timeline, from their chroma. 'similarity': exactly two files; how well each stretch of the first file is matched by the second, from chroma (pitch content only, not timbre).summary
pathsYes2 to 8 audio files. In every mode the first file is the reference the others are measured against.
rangeNoAnalyze only this window ({start_sec, end_sec}, in seconds); an end_sec past the file length is clipped. Omit for the whole file. The same window is cut from every file.
detailNo'concise' returns the summary and the most useful fields; 'full' returns all.concise
write_abNoWith mode reference: also write a loudness-matched blend of the two files, for listening to them against each other (path in 'files').
ab_mix_ratioNoWith write_ab: share of the reference (the first file) in the blend; 0 is the second file alone and 1 the reference alone.
max_offset_secNoLargest time offset between the files that the offset search looks for, in seconds (0 to 60). A larger offset than this is reported as 0.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

Annotations only say readOnlyHint=true / openWorldHint=false; the description adds real substance beyond that, explaining what the null residual means, that align/similarity read chroma and therefore ignore timbre, and that an offset beyond max_offset_sec is silently reported as 0. One tension: write_ab writes a blend file to disk, which sits awkwardly with readOnlyHint=true, though the description does disclose the side effect rather than hide it.

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 lead sentence is well front-loaded, but the body is a single dense run-on that packs mode contracts, caveats and examples into one paragraph, and the nested parenthetical in the null-residual clause is hard to scan. Nothing is clearly wasted, yet splitting the mode descriptions into discrete sentences would cost no length and gain readability.

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 seven-parameter tool with no output schema, the description still tells the agent what comes back per mode (meters, differences, offset, residual, match-EQ curve, blend), the file-count constraints per mode, and the chroma caveat. Nothing needed to call it correctly is missing.

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 the baseline is 3, and the description still earns more: it defines the reference-relative meaning of paths ("the first file is the reference the others are measured against"), pins reference/align/similarity to exactly two files, and gives a worked example binding paths and mode together.

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?

Opens with a specific verb and resource ("Compares 2 to 8 audio files") and enumerates what is measured: loudness, band balance, tempo, key, differences vs. the first file, time offset and null residual. Each of the four modes is given its own concrete scope, so an agent can distinguish compare-from-analyze without opening the schema.

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?

States explicit exclusions with named alternatives: "Do not use it for one file (audio_info, audio_loudness) or to change anything (audio_master matches a reference)". It also names the situations that select each mode (checking a mix against a reference, placing a take under a reference, stretch-wise pitch matching) and supplies an example invocation.

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