Skip to main content
Glama
libsonare-mcp

libsonare-mcp

Official
by libraz

List audio devices, record, capture MIDI or run live-through

audio_device

List audio and MIDI hardware, record an input to a file, capture MIDI to .mid, or monitor live input through effect chains and voice changers for a set duration.

Instructions

Works with the audio and MIDI hardware of the machine running this server. Every call is bounded: record, captureMidi and liveThrough need duration_sec (at most 600 seconds) and return when it has passed; there is no start or stop. listDevices lists audio inputs, audio outputs and MIDI inputs. record writes an audio input to a new file; captureMidi writes a MIDI input to a new .mid; liveThrough sends an input through a chain or a voice changer to an output, optionally also writing a file. Results name the device used (explicit or default) and give a level summary. Use it when the user asks to record, capture a keyboard or hear live processing. Not for playing a file (audio_play) or offline processing (audio_process). Refused with an explanation while libsonare has no device backend; dry_run shows the planned file without touching a device. Example: {"op": "record", "duration_sec": 10}.

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": {
      "op": "<op>"
    },
    "name": "audio_device"
  }
}

Input Schema

NameRequiredDescriptionDefault
opYes'listDevices' lists audio inputs, audio outputs and MIDI inputs; 'record' records an audio input to a new file; 'captureMidi' records a MIDI input to a new .mid; 'liveThrough' runs an input through a processing config to an output for duration_sec, optionally also writing a file.
chainNoFor liveThrough: insert chain applied to the input, same steps as audio_process. Give this or voice_change.
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.
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.
duration_secNoFor record, captureMidi and liveThrough (required): how long to run, in seconds, at most 600. The call returns when it is over.
voice_changeNoFor liveThrough: the voice changer to run, a preset or a whole document as in audio_vocal's voice_change. Give this or chain.
midi_input_indexNoFor captureMidi: MIDI input index from listDevices. Omit for the first MIDI input.
input_device_indexNoFor record and liveThrough: audio input device index from listDevices. Omit for the system default input.
output_device_indexNoFor liveThrough: audio output device index from listDevices. Omit for the system default output.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior5/5

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

Beyond the annotations it discloses the traits that actually change how an agent calls this: the tool touches real hardware, every capturing op is time-bounded by duration_sec (max 600) and blocks until the window ends with no start/stop, and the whole tool is currently refused with an explanation because there is no device backend. It also notes dry_run inspects the plan without touching a device and that results report the resolved device and a level summary.

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 bounding rule are front-loaded, then behavior, then usage routing, then the backend caveat and a one-line example. Dense but nearly every sentence carries information; the op-by-op list slightly restates what the 'op' enum description already says.

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 15-parameter, hardware-touching tool with no output schema, it covers the key operational facts: blocking duration semantics, device defaults, op semantics, unavailability, and a partial return-value sketch (device name plus level summary). It stops short of describing the full result shape, but the schema carries the rest of the argument detail.

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%, and the embedded field descriptions already explain duration_sec bounds, device index defaults, chain/voice_change exclusivity and overwrite behavior in more detail than the prose. The description mainly reinforces the op-to-parameter mapping, with the only real addition being a worked example call.

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 set of operations (listDevices, record, captureMidi, liveThrough) against a concrete resource (the machine's audio and MIDI hardware), and explicitly contrasts itself with audio_play and audio_process. An agent can tell what this tool does and does not do 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?

It gives an explicit trigger ('when the user asks to record, capture a keyboard or hear live processing') and explicit exclusions naming the sibling tools to use instead (audio_play for playback, audio_process for offline work). That is the when/when-not/alternative triad in full.

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