Skip to main content
Glama
libsonare-mcp

libsonare-mcp

Official
by libraz

Split audio into several files

audio_split
Destructive

Cuts audio into multiple files at specified times, silences, song sections, or every N bars/beats; also splits several takes together at shared silent stretches.

Instructions

Cuts one audio file into several files at given times, at silences, at detected song sections, or every N bars or beats of the detected beat grid; a trailing remainder joins the last file, and all files are written or none are. Several takes of one part ('paths') are cut together at the stretches where all of them are silent. Use it to chop a recording into tracks, slice a song into 4-bar loops, or separate takes. Do not use it to keep one window (use audio_edit trim), to join files (use project_create with layout sequence) or to separate instruments (use audio_separate). Example: {"path": "session.wav", "by": "silence", "top_db": 45}.

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": {
      "by": "<by>"
    },
    "name": "audio_split"
  }
}

Input Schema

NameRequiredDescriptionDefault
byYesHow to find the cut points: 'times' (the given seconds), 'silence' (one file per non-silent stretch), 'sections' (detected song sections), 'bars' or 'beats' (every N bars / beats of the detected grid).
pathNoInput audio file (wav, flac, mp3, ogg, aiff, ...). Give this or 'paths'.
pathsNoSeveral takes of one part (same sample rate), cut together at the stretches where every take is silent, so a cut never lands inside a phrase of any take. Needs by='silence'; one file per take and stretch is written. Give this or 'path'.
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.
prefixNoFile name prefix; files are named '<prefix>.<tool>.<part>.<ext>'. Default: the input's stem.
top_dbNoFor by='silence': dB below the peak that counts as silence (default 40).
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.
from_barNoFor by='bars': bar at which counting starts, numbered as audio_analyze numbers bars: whole bars count from 1 and an incomplete opening bar is 0. Audio before it becomes its own file, except a bar 0 before from_bar 1, which joins the first file (default 1).
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.
times_secNoFor by='times': increasing cut points inside the audio, in seconds.
output_dirNoDirectory for the output files. Default: the output directory.
every_countNoFor by='bars' / 'beats': a file every this many bars / beats (default 4).
sample_rateNoOutput sample rate in Hz; the audio is resampled when it differs. Default: the input's rate. Opus is always 48000.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and non-idempotent writes, so the safety burden is partly covered. The description adds genuinely new behavioral facts beyond them: atomic all-or-nothing writing ("all files are written or none are") and the trailing-remainder rule merging the last segment, plus the multi-take constraint that cuts land only where every take is silent. It does not restate the overwrite/error-on-existing behavior, but the schema covers 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?

Lead sentence is front-loaded with purpose and scope, followed by use cases, exclusions, and an example — a sensible order with no filler. The opening sentence is long and semicolon-chained, which slightly slows parsing, but nothing is redundant enough to cut.

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 16-parameter destructive tool with no output schema, the definition covers the decision-relevant surface: what each mode does, multi-take semantics, atomicity, and which sibling to use instead. Remaining details (naming, formats, dry_run) are fully specified in the schema, so nothing an agent needs before calling 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 description coverage is 100%, so a baseline of 3 applies and the schema already documents every parameter thoroughly. The description still adds value by mapping each mode name to its intended parameter use and by showing a realistic call ({"path": "session.wav", "by": "silence", "top_db": 45}) that ties 'by' and 'top_db' together in context.

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 opens with a concrete verb and resource ("Cuts one audio file into several files") and then enumerates the five cut-point modes, matching the 'by' enum exactly. It is immediately distinguishable from siblings such as audio_edit, audio_separate and project_create, which it names 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 gives positive use cases (chop a recording into tracks, slice into 4-bar loops, separate takes) and explicit exclusions with the correct alternative tool for each: keep one window -> audio_edit trim, join files -> project_create with layout sequence, separate instruments -> audio_separate. A worked example call is included.

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