Skip to main content
Glama
libsonare-mcp

libsonare-mcp

Official
by libraz

Diagnose audio problems

audio_diagnose
Read-only

Scans a recording for defects such as clipping, clicks, crackle, noise, hum, reverb, phase/mono issues, band limits, and silence, reporting measurements and fixes before repair.

Instructions

Finds problems in a recording: clipping (including flat-topped plateaus below full scale), clicks and pops, crackle, background noise level, mains hum, reverberation, DC offset, phase problems and mono compatibility, a band limit (low-pass or lossy source), and leading or trailing silence; checks adds a mono-fold analysis and the mastering assistant's profile. Each issue is flagged with its measurements and a fix, and suggested_stages can be passed unchanged to audio_repair. Use it before repairing, or to ask 'what is wrong with this file'. Do not use it for loudness or tempo (audio_loudness, audio_analyze) or to fix the file (audio_repair). Example: {"path": "old_recording.wav"}.

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_diagnose"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesAudio file to inspect (any channel count).
rangeNoAnalyze only this window ({start_sec, end_sec}, in seconds); an end_sec past the file length is clipped. Omit for the whole file.
checksNoExtra checks beyond the defect scan: monoCompat (stereo files: how the mix survives a fold to mono, overall and per band) and masteringProfile (loudness, spectral balance and dynamics as the mastering assistant reads them). Omit for the defect scan alone.
detailNo'concise' returns the summary and the most useful fields; 'full' returns all.concise

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 only declare that it is a safe, closed-world read; the description adds genuinely new behavior: each issue comes back with its measurements and a fix, and suggested_stages is pipeline-compatible with audio_repair. It also explains what the optional checks add beyond the baseline defect scan. It does not describe result volume or performance characteristics, which keeps it short of a 5.

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?

Purpose and the defect inventory are front-loaded, followed by usage rules and an example, so the paragraph is well ordered. It is dense—an eleven-item defect list in one sentence—and the phrase "checks adds a mono-fold analysis" reads awkwardly, but no sentence is wasted.

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-value burden and does so reasonably: issues carry measurements and fixes, plus suggested_stages and the extra checks. The detail enum and range clipping are left entirely to the schema, which is acceptable since coverage is complete. A read-only diagnostic with full param coverage is adequately specified.

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 the schema already defines path, range, checks and detail. The description largely restates the checks semantics (mono-fold, mastering profile) and gives one example path; it adds no range or detail-mode guidance beyond what the structured fields provide. Baseline 3 is appropriate.

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?

"Finds problems in a recording" gives a specific verb plus resource, then enumerates the exact defect classes detected (clipping, clicks, hum, DC offset, phase, band limit, silence). It explicitly separates itself from audio_loudness, audio_analyze and audio_repair, so an agent can pick it without opening any 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 both when to use it ("before repairing", "what is wrong with this file") and when not to (loudness/tempo → audio_loudness/audio_analyze; fixing → audio_repair), naming the alternative tool for each exclusion. Nothing is left to inference.

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