Skip to main content
Glama
libsonare-mcp

libsonare-mcp

Official
by libraz

Render a project or MIDI file to audio

project_render
Destructive

Render a project or MIDI file to stereo audio with per-track instruments, SoundFonts, synths, or samplers, plus optional time range, metronome, and output format.

Instructions

Renders a project file, or a .mid file through the General MIDI bank, to a stereo audio file. 'instruments' plays chosen MIDI tracks through a synth preset or patch, the built-in oscillator synth, a SoundFont program or a sampler built from audio files, for this render only. MIDI tracks without an instrument play the General MIDI bank. A render that plays the General MIDI bank or a SoundFont ends a fixed 3 s after the last clip, so a longer release is cut. 'range' keeps one window in quarter notes. Use it to hear a project, or before audio_master and the audio_ measuring tools. It does not master (audio_master). Example: {"source": "song.sonare.json", "instruments": [{"track": "bass", "instrument": {"kind": "synth", "preset": "subBass"}}], "format": "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": {
      "source": "<source>"
    },
    "name": "project_render"
  }
}

Input Schema

NameRequiredDescriptionDefault
rangeNoKeep only this window ({start_ppq, end_ppq}, quarter notes). Default: the whole timeline.
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.
sourceYesA project file (.sonare.json) or a .mid file (rendered through the General MIDI bank).
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.
metronomeNoMix a metronome click into the render.
overwriteNoReplace an existing output file. Without it an existing file is an error.
instrumentsNoInstruments for this render only, one entry per MIDI track; the file is not changed. Tracks without an instrument play the General MIDI bank. Each sf2 entry selects the SoundFont for its track.
sample_rateNoOutput sample rate in Hz; the audio is resampled when it differs. Default: the input's rate. Opus is always 48000.
count_in_barsNoBars before the project starts, 1-16. The count-in is silent unless metronome is enabled.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare destructive=true and non-idempotent, but the description adds a non-obvious behavioral quirk: GM or SoundFont renders stop a fixed 3 s after the last clip, truncating longer releases. It also stresses that instrument overrides apply 'for this render only' and the file is not changed, which is otherwise surprising for a write-flagged tool. It does not describe the returned value or cost/time characteristics.

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?

The core purpose and the when-to-use guidance are front-loaded, and the trailing example earns its space by showing the instrument object shape. Some sentences are dense and the quoted parameter names read awkwardly, but there is no filler.

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 13-parameter, destructive render tool with no output schema, the description covers the semantics that matter most (source types, per-track instruments, range, GM fallback, the 3 s tail, and the audio_master boundary). The notable gaps are what the tool returns (a path? a summary?) and how the detail/dry_run flags shape the response, which the description leaves to the schema.

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 3 is the floor, and the description adds real meaning on top: 'instruments' is render-only and per-track, unaffected tracks fall back to GM, and 'range' is a single quarter-note window. The worked JSON example clarifies the nested instrument shape better than prose alone, though other params (quality, bit_depth, count_in_bars) are left entirely to the schema.

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 opening sentence gives a specific verb and resource: renders a project file or a .mid file (through the General MIDI bank) to a stereo audio file. It also names the sibling it is not ('It does not master (audio_master)'), so an agent can separate it from the mastering tool without reading schemas.

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?

'Use it to hear a project, or before audio_master and the audio_ measuring tools' states both the direct use and its position in a workflow. The exclusion of mastering with the named alternative makes the boundary explicit rather than inferred.

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