Skip to main content
Glama
libsonare-mcp

libsonare-mcp

Official
by libraz

Draw audio as an image

audio_visualize
Read-only

Render audio as waveform, spectrogram, chroma, pitch, loudness, or stereo-field PNGs to visually inspect clipping, noise, band limits, repeats, and rhythm.

Instructions

Draws an audio file as a PNG you can look at: waveform, spectrogram, mel spectrogram, constant-Q (cqt), chroma, pitch curve, loudness over time, tempogram, self-similarity (song structure), onset strength, a reassigned spectrogram, or the stereo field as a vectorscope or phase scope. Mel can use PCEN and cqt can be variable-Q (gamma). The reply also carries the axis ranges, dB range and seconds per pixel, and 'save' keeps the PNG as a file. Use it to see what a recording looks like, spot clipping, noise, band limits, repeated sections or rhythm. Do not use it for exact numbers (audio_info, audio_analyze, audio_loudness, audio_pitch, audio_features) or for notes in a MIDI file (midi_visualize). Example: {"path": "song.wav", "kind": "spectrogram", "range": {"start_sec": 0, "end_sec": 30}}.

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>",
      "kind": "<kind>"
    },
    "name": "audio_visualize"
  }
}

Input Schema

NameRequiredDescriptionDefault
kindYesWhat to draw: waveform (amplitude), spectrogram (log-frequency dB), mel (mel spectrogram), cqt (constant-Q, note axis), chroma (12 pitch classes), pitch (f0 curve), loudness (momentary and short-term LUFS), tempogram (tempo over time), selfSimilarity (time-by-time chroma similarity), onsets (onset strength with detected onsets marked), reassigned (spectrogram with each bin moved to its energy's true time and frequency, sharper than the plain one), vectorscope (stereo field: mid against side) and phaseScope (stereo phase: angle against radius); the two scopes need a stereo file.
pathYesAudio file to draw.
pcenNoWith kind mel: draw per-channel energy normalization (PCEN), which flattens loudness and noise differences, instead of dB.
saveNoAlso write the PNG as a new file in the output directory (path in 'files').
gammaNoWith kind cqt: bandwidth offset in Hz of a variable-Q transform, which keeps low notes from smearing in time. Omit for the plain constant-Q transform.
rangeNoDraw only this window ({start_sec, end_sec}, in seconds). Omit for the whole file; a window of a few seconds to a minute reads best.
widthNoImage width in pixels (240-1400, default 1200).
detailNo'concise' returns the summary and the most useful fields; 'full' returns all.concise
heightNoImage height in pixels (160-1400, default 480).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only declare readOnlyHint and openWorldHint, so the description carries the rest and does it well: it discloses what the reply contains (axis ranges, dB range, seconds per pixel), that 'save' writes a PNG file whose path appears in 'files', and the precondition that the two scope kinds need a stereo file. These are exactly the non-obvious behavioral facts an agent needs before invoking.

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 action and the kind catalogue, then usage, exclusions, and an example in a logical order with no filler. The first sentence is very long and its 13-item enumeration partially restates the kind enum, though the glosses justify most of the length.

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 9-parameter rendering tool with no output schema, the description covers the return payload (axis/dB/seconds-per-pixel metadata), the save side effect, preconditions, and a worked example. Nothing material an agent would need to call it correctly appears to be 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, but the description adds real interaction semantics the schema states only per-parameter: mel can take PCEN, cqt can take variable-Q gamma, range reads best at a few seconds to a minute, and it supplies a concrete example call. It stops short of explaining width/height or detail trade-offs, so it is not quite exhaustive.

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 concrete verb+resource ("Draws an audio file as a PNG") and then enumerates the exact visual kinds it can produce, each with a short gloss ("selfSimilarity (song structure)", "vectorscope (stereo field)"). An agent can tell instantly that this is a rendering tool rather than a measurement tool, distinguishing it from audio_analyze/audio_info by name.

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?

Gives positive triggers ("see what a recording looks like, spot clipping, noise, band limits, repeated sections or rhythm") and explicit exclusions naming five siblings for exact numbers plus midi_visualize for MIDI notes. The when-to-use and when-not-to-use split is unambiguous and routed to real alternatives.

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