Skip to main content
Glama
libsonare-mcp

libsonare-mcp

Official
by libraz

Repair audio (denoise, declick, dehum)

audio_repair
Destructive

Repairs noisy or damaged recordings by removing clicks, crackle, clipping, hum, hiss, background noise and reverb, using explicit stages, restoration presets or automatic defect analysis.

Instructions

Repairs recordings: declip, declick, decrackle, dehum (50/60 Hz mains hum), denoise (hiss, background noise) and dereverb, as explicit stages, as a restoration preset (vinyl, tapeHiss, fieldRecording, voiceMemo, shellac78), or automatically from a defect analysis (auto: true); dereverb can be tuned to the measured room (dereverb_from_room). Use it after audio_diagnose, whose suggested_stages it takes unchanged; it is the one tool that accepts any channel count. Do not use it for creative effects (use audio_process), loudness mastering (use audio_master) or to only detect problems (use audio_diagnose). Example: {"path": "interview.wav", "stages": [{"stage": "denoise", "params": {"reductionDb": 12}}, {"stage": "dehum"}]}.

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

Input Schema

NameRequiredDescriptionDefault
autoNoMeasure the defects and apply the stages the analysis recommends.
pathYesInput audio file; any channel count.
rangeNoOnly process this window {start_sec, end_sec}; the output contains just the window. An end_sec past the end is clipped (reported in warnings). Default: the whole file.
detailNo'concise' returns the summary and the most useful fields; 'full' returns all.concise
formatNoOutput format: wav, flac, ogg (Vorbis), opus, mp3, aiff, or m4a (AAC, needs ffmpeg). Default: the explicit output's extension, else the input's format, else wav.
outputNoOutput file path. Default: an auto-named new file '<input stem>.<tool>.<ext>' in the output directory.
presetNoRestoration preset: vinyl, tapeHiss, fieldRecording, voiceMemo or shellac78 (a full restoration master; mono or stereo only).
stagesNoExplicit repair stages, e.g. [{stage: 'denoise', params: {reductionDb: 12}}]. audio_diagnose's suggested_stages can be passed unchanged.
dry_runNoReport the resolved output plan and paths without processing or writing.
qualityNoLossy encoder setting for ogg/opus/mp3, 0..1 (soundfile compression_level, variable bit rate): 0 = best quality, 1 = smallest file. On 48 kHz stereo music, mp3 0 / 0.3 / 1 is about 192 / 120 / 55 kbit/s (no 320 kbit/s setting), ogg about 330 / 150 / 45 and opus about 510 / 360 / 13. Default 0.3. Excludes bit_depth.
bit_depthNoPCM bit depth for wav/flac/aiff: 16, 24 or 'float32' (32-bit float; not flac). Default: the input's depth, else 24. Excludes quality.
overwriteNoReplace an existing output file. Without it an existing file is an error.
sample_rateNoOutput sample rate in Hz; the audio is resampled when it differs. Default: the input's rate. Opus is always 48000.
dereverb_from_roomNoMeasure the room of the recording and use its measured reverberation time and late delay for the dereverb stage; values with no measurement keep the defaults. The stage's other settings are kept. Needs a dereverb stage in 'stages' or an 'auto' run that recommends one.

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 declare destructiveHint=true, readOnlyHint=false, and non-idempotent, so the safety profile is covered. The description adds genuinely new behavioral context: it accepts any channel count (unique among siblings), preset use is restricted to mono/stereo, and dereverb can be measured from the room. It could go further on whether output is always a new file, but the schema handles that.

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?

Front-loaded with the core purpose, then presets, then routing guidance, then an example — a sensible order. The single long opening sentence is dense but every clause carries information; nothing is redundant.

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?

For a 14-parameter tool with nested stage objects, the description plus the fully annotated schema provide enough to call it correctly, including the example for the nested parameter. No output schema exists, but the description's mention of warnings clipping and preset restrictions covers the main return caveats indirectly.

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%, so every parameter is already documented in detail. The description adds a concrete usage example for the tricky nested 'stages' parameter and notes that audio_diagnose's suggested_stages can be passed unchanged, which is real added meaning. That nudges it just above the baseline-3 for high-coverage schemas but not to a 4 given how much the schema already carries.

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 (repairs) and enumerates the resources/stages it covers (declip, declick, decrackle, dehum, denoise, dereverb) plus preset and auto modes. It distinguishes itself from siblings by naming audio_diagnose, audio_process, and audio_master explicitly.

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 states exactly when to use it (after audio_diagnose, taking suggested_stages unchanged) and when not to use it, naming the correct alternative for each excluded case: audio_process for effects, audio_master for loudness, audio_diagnose for detection only. 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.