libsonare-mcp
OfficialServer Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| SONARE_MCP_OUTPUT_DIR | No | Directory where written files land. Defaults to ./sonare-out/ under the client's working directory. | |
| SONARE_MCP_MAX_SECONDS | No | A limit on processing duration; other limits are described in the Configuration documentation. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
libsonare-mcp measures, edits, generates, arranges and explains music: audio files, MIDI files, project files and music theory.
Tool families: music_* (capabilities and name catalogs), audio_* (measure and change one audio file), midi_* (write, edit, compose and read notes), project_* (arrange tracks and clips, mix, and render a song), theory_* (analysis, checks and lookups).
Every song is passed by path: an audio file, a .mid/.midi file, or a project file whose name ends in .sonare.json. Start with audio_info or audio_analyze for audio, midi_read for MIDI and project_read for a project. Look up processor, preset and parameter names with music_catalog before audio_process, audio_master or audio_repair.
Units are in the argument name: _sec for audio time (start_sec, end_sec; numbers only), _ppq for musical positions in quarter notes (start_ppq, length_ppq), _db, _hz, _bpm and so on. Times outside a file are rejected or cut to its length with a warning. A level at its infinite end (-inf dB: digital silence, an empty band, a fold that cancels out) is null; a value that was not measured (input too short, a measure that does not apply) is left out.
Files: new outputs go to $SONARE_MCP_OUTPUT_DIR, else ./sonare-out/, else ~/Music/libsonare-mcp/, and existing files are replaced only with overwrite: true. project_edit (and midi_edit on a project) update the project file in place and keep no undo history: use dry_run: true to preview, or output to write a new project and keep the old one. To process one MIDI part as audio: project_render it with that track soloed, audio_process the result, add it back with project_edit addAudioClip, and mute the MIDI track.
You cannot hear audio. Judge it from the numbers and images these tools return (audio_visualize, midi_visualize), and let the user listen with audio_play or by opening the output path. Estimates (tempo, key, chords, meter) come with confidence and alternatives; report the uncertainty instead of picking silently.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| music_capabilitiesA | Reports what this server can do right now: the versions of the server, libsonare (its shared library path and ABI) and libcantus, which audio formats can be read and written (and whether ffmpeg is present), the output directory, the size and time limits with the environment variables that change them, canceled jobs still running, and a short guide to which tool family does what. Use it first when a file will not open, an output format is refused, a result looks cut off, or you need to know where files are written. Not for names of processors, presets or scales (use music_catalog). detail 'full' adds the build features, decoders, every ABI version and the host's CPU cores, memory and parallel workers (check it before a heavy job). Example: {}. |
| music_catalogA | Lists the names other tools accept: audio processors and their parameters, mastering presets and delivery platforms, amp rigs, mixer scene presets, mix source classes, synth and voice presets, General MIDI programs and drums, GS drum kits, progression, drum and bass styles, instruments, scales, chord qualities and the libcantus functions theory_lookup calls, with paging and a text filter. Use it to find the exact processor id or preset name before audio_process, audio_master, audio_repair or project_edit, or kind 'processor' with an id to get every parameter's range, unit and default for building a chain. detail 'full' lists every entry in its detailed form. Not for looking up one chord or scale's notes (use theory_lookup). Example: {"kind": "processor", "id": "eq.parametric"}. |
| audio_infoA | Reports what an audio file is and how loud it is: container and codec, duration, sample rate, channels, bit depth, text tags, plus peak, RMS, integrated LUFS, true peak, DC offset, clipped-sample count, silence ratio and stereo correlation. Use it first on any file, to compare several files, or to check a loudness or clipping problem quickly. Do not use it for tempo, key or chords (use audio_analyze) or for loudness over time and streaming-platform previews (use audio_loudness). Example: {"paths": ["~/Music/mix/*.wav"]} inspects every wav in a folder. |
| audio_analyzeA | Analyses music: tempo (BPM) with alternatives, beats, onsets, meter (time signature), key with ranked candidates, a chord timeline with bar and beat, sections, melody, tuning, timbre, dynamics, rhythm and percussive hits, with roman numerals and harmonic functions on request. Use it to answer 'what is the BPM / key / chord progression / structure of this song'. Every estimate carries a confidence and the warnings say where it is shaky, for example a wrong meter or a half-time tempo; bar and beat are always attached even when the meter is doubtful. Tempo and key are the derivation project_create and midi_compose use; the first key candidate is the bass-weighted full-analysis key and the rest are ranked by chroma alone, so their confidences are not comparable, and hits are rule-based detections. Do not use it for loudness (audio_loudness), a single pitch track (audio_pitch) or raw spectral features (audio_features); symbolic files go to midi_read and theory_analyze. Example: {"path": "song.wav", "aspects": ["tempo", "key", "chords"], "chords_seventh": true}. |
| audio_loudnessA | Measures loudness the way delivery standards do: integrated, momentary and short-term LUFS, loudness range (LRA), true peak, sample peak, crest factor, stereo correlation and width, a low/mid/high band balance measured at the file's own sample rate, and eight streaming and broadcast previews (Spotify, Apple Music, YouTube, Amazon Music, Tidal, Deezer, EBU R128, podcast) with the gain each would apply and any true-peak ceiling risk. Use it to check a master against a target, to see loudness over time with 'resolution', or after audio_master. Do not use it for general file facts (audio_info) or to change the level (audio_master, audio_edit). Example: {"path": "master.wav", "platforms": ["spotify", "appleMusic"], "resolution": "coarse"}. |
| audio_pitchA | Tracks the fundamental frequency of a monophonic voice or instrument with pYIN or YIN, segments it into notes, estimates the tuning offset, and reports each note's deviation in cents from equal temperament, from a key's scale or from the notes of a MIDI file; note_pitch_detail splits each note into center, drift and vibrato. Use it for intonation checks, singing accuracy, tuning (A=440?) and extracting a melody line. Do not use it for chords or polyphonic music (audio_analyze, audio_transcribe) or to correct pitch (audio_vocal). pYIN is limited to 15 minutes of audio; pass 'range' for longer files. Example: {"path": "vocal.wav", "reference": {"key": "A minor"}, "resolution": "medium"}. |
| audio_featuresA | Computes music-information-retrieval features at the file's own sample rate: spectral centroid, bandwidth, rolloff, flatness and contrast, zero-crossing rate, RMS, MFCC and its deltas, four chroma variants, tonnetz, onset strength (also per band), spectral flux, polynomial features, PLP, several tempogram forms and an octave-band spectrum over time. Returns statistics (mean, std, p10, p50, p90), a time series at a chosen resolution, or exports the full matrices as npy or csv files in the output directory for further processing. Use it for brightness/timbre comparisons and as input to your own scripts. Do not use it for loudness (audio_loudness), tempo or key (audio_analyze) or to look at a spectrogram (audio_visualize). Example: {"path": "take.wav", "features": ["mfcc", "chroma"], "aggregate": "export", "export_format": "csv"}. |
| audio_compareA | Compares 2 to 8 audio files: loudness (LUFS, true peak), band balance, tempo and key per file, then the differences against the first file, the time offset between them and a null residual (what is left after matching loudness and aligning the delay, so a value near silence means the files are the same audio). In reference mode it takes exactly two files and runs the full reference analysis (loudness match, tonal balance, match-EQ curve, delay) of the second against the first, as when checking a mix against a reference track or an original against a mastered copy, and can write a level-matched blend of the two (write_ab) for listening. Mode align gives the anchors that place a take under a reference, and mode similarity shows how well the second file matches each stretch of the first; both read chroma, so pitch content only. Do not use it for one file (audio_info, audio_loudness) or to change anything (audio_master matches a reference). Example: {"paths": ["reference.wav", "mix.wav"], "mode": "reference"}. |
| audio_diagnoseA | Finds problems in a recording: clipping (including flat-topped plateaus below full scale), clicks and pops, crackle, background noise level, mains hum, reverberation, DC offset, phase problems and mono compatibility, a band limit (low-pass or lossy source), and leading or trailing silence; checks adds a mono-fold analysis and the mastering assistant's profile. Each issue is flagged with its measurements and a fix, and suggested_stages can be passed unchanged to audio_repair. Use it before repairing, or to ask 'what is wrong with this file'. Do not use it for loudness or tempo (audio_loudness, audio_analyze) or to fix the file (audio_repair). Example: {"path": "old_recording.wav"}. |
| audio_acousticsA | Measures room acoustics: from an impulse response it reports reverberation time (RT60), early decay time, clarity (C50, C80) and definition (D50) per octave band. Unmeasured RT60 and absorption values are omitted and named in warnings. From any recording it estimates the equivalent room (volume, dimensions, per-band absorption, direct-to-reverberant ratio) blindly, which can take tens of seconds on a long file. Use it to judge a room, a reverb or a convolution impulse. Do not use it to add or remove reverb (audio_process, audio_repair) or to make an impulse response (audio_generate kind roomIr). Example: {"path": "hall_ir.wav", "mode": "ir", "n_octave_bands": 6}. |
| audio_visualizeA | 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}}. |
| midi_visualizeA | Draws a MIDI file, a project file's MIDI tracks or inline tracks as a piano-roll PNG: notes as rectangles (pitch up, quarter notes right) colored per track and shaded by velocity, bar lines from the time signatures and an optional chord strip. The reply carries the PPQ and pitch ranges drawn, and 'save' keeps the PNG as a file. Use it to look at an arrangement, a generated part or an edit. Do not use it to list exact notes (midi_read), to analyze harmony (theory_analyze) or to draw audio (audio_visualize). Example: {"source": "song.mid", "range": {"start_ppq": 0, "end_ppq": 32}, "track": "bass"}. |
| audio_editA | Converts an audio file to another format (wav, flac, ogg, opus, mp3, aiff, m4a; bit depth, quality, sample rate) and/or edits it with an ordered list of ops: trim, cut, fadeIn, fadeOut, gain, normalize (peak, rms, lufs), resample, channels (mono, stereo, left, right, swap), reverse, pad, repeat, trimSilence (peak or lufsGated), dcRemove, pitchShift (pitch_semitones or to_key), timeStretch (speed_ratio, tempo_bpm or duration_sec), moveRegion and stretchRegion (one note or phrase), rearrange (rebuild from slices of the audio), editHits (move, level or mute percussive hits) and spectralEdit (change a time x frequency rectangle). Text tags are carried over. Use it for 'convert to mp3', 'cut from 30 s to 60 s', 'fade out the last 3 seconds', '-3 dB' or 'make it 90 BPM'; ops: [] is a pure conversion. Do not use it for EQ, compression or effects (use audio_process), loudness mastering with a true-peak ceiling (use audio_master), joining several files (create a project with project_create layout "sequence" and render it with project_render) or cutting into several files (use audio_split). Example: {"path": "song.wav", "ops": [{"op": "trim", "start_sec": 30, "end_sec": 60}, {"op": "fadeOut", "duration_sec": 3}], "format": "mp3"}. |
| audio_splitA | 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}. |
| audio_generateA | Synthesizes audio from scratch: a sine tone, a frequency sweep (chirp), white or pink noise (seeded), a metronome click track with accented downbeats at a BPM and time signature, silence, a synthetic room impulse response from room size, absorption or wall material, source and listener positions (or imitating the room of a recording with 'like'), or audio rebuilt from a feature matrix exported by audio_features (fromFeatures). The default sample rate is 48000 Hz and the file is mono. Use it for test signals, a click to play along to, or an IR for convolution reverb. Do not use it to render MIDI or a project (use project_render) or to process existing audio (use audio_edit or audio_process). Example: {"kind": "click", "tempo_bpm": 100, "time_signature": {"numerator": 3, "denominator": 4}, "bar_count": 8}. |
| audio_processA | Applies a chain of audio processors in order: EQ, compressor, limiter, gate, de-esser, reverb, delay, chorus, flanger, saturation, stereo width, room morph and the rest of the 95 catalog processors, and reports loudness (LUFS), true peak and low/mid/high band balance before and after. Parameters can move over time with 'automation', the audio can be rendered for headphones or speakers with 'playback_render', and dry_run with report 'eqResponse' returns the EQ curve of the chain. Use it for a specific effect or a hand-built chain; look up processor ids and parameters with music_catalog first. Do not use it to master to a loudness target (use audio_master), to remove noise, clicks or hum (use audio_repair), to match a reference track (audio_master with reference), to mix or join several files (use project_create and project_render), or for gain, fades, trim and format conversion (use audio_edit). Example: {"path": "vocal.wav", "chain": [{"processor": "eq.parametric", "params": {}}, {"processor": "effects.reverb.plate", "params": {}}]}. |
| audio_masterA | Masters a track: EQ, compression, saturation, stereo imaging, true-peak limiting and loudness normalization to a LUFS target and dBTP ceiling, with a preset (pop, edm, podcast, classical, ...), a delivery platform (streaming, youtube, broadcast, club, cd), a reference track to match, or the chain the mastering assistant suggests for the audio, with optional chain settings ('overrides') on top. Use it for 'make it -14 LUFS', 'master this for Spotify' or 'make it sound like this reference'; dry_run: true returns the suggested chain, the reasons and a streaming-platform normalization preview without writing. Do not use it to only measure loudness (use audio_loudness), for single effects (use audio_process) or for noise and click removal (use audio_repair). Example: {"path": "song.wav", "target_lufs": -14, "ceiling_dbtp": -1}. |
| audio_repairA | 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"}]}. |
| audio_separateA | Splits an audio file into component files: method 'hpss' gives a harmonic (sustained tones) and a percussive (hits, transients) part, optionally with a residual; method 'nmf' factorizes the spectrogram into 2-16 components that add back up to the input (linked across channels for stereo, seeded by 'nmf_init'); method 'nnFilter' splits a repeating background from a non-repeating foreground by nearest-neighbor filtering of the spectrogram. Separation is signal-based (HPSS, NMF, nearest-neighbor masks), NOT a learned stem-separation model: the components are not named instruments, and a vocal cannot be cleanly isolated from a mix. Use it to pull drums away from sustained pads, to listen to what an NMF component holds, or as preparation for analysis. Do not use it to cut a file in time (audio_split) or to correct a voice (audio_vocal). Long inputs are limited; pass a 'range'. Example: {"path": "song.wav", "method": "hpss", "with_residual": true}. |
| audio_vocalA | Edits the pitch of a vocal or other single melodic line and writes a new file. Mode 'autoTune' corrects pitch, snapping notes to a scale (detected or named key); 'tuneToMidi' moves each sung note onto the matching note of a reference .mid; 'voiceChange' shifts pitch and formants or applies a voice preset; 'editNotes' detects the notes and moves, transposes, re-gains or mutes chosen ones in one call (a dry run lists the notes and their indices). The result reports the measured pitch change in cents. To put an edited take back into a project, pass the output to project_edit 'setClipSource'. Do not use it to measure intonation (audio_pitch), for EQ or effects (audio_process) or to transpose a whole mix (audio_edit). Stereo input is processed as its mono downmix. Example: {"path": "take.wav", "mode": "editNotes", "edit_notes": {"edits": [{"note_index": 3, "target_midi": 64}]}}. |
| audio_transcribeA | Converts pitched audio (a melody, a bass line, a piano part) into notes and writes a Standard MIDI File; the response gives the note count and the first rows of the note table with their times in seconds. With 'context' (a project file) the .mid carries that project's tempo map and time signatures, so it drops onto the project's grid with project_edit 'addMidiClip'; otherwise the tempo is tempo_bpm or derived from the audio. quantize_ppq snaps the notes. Use it for 'turn this recording into MIDI' or 'what notes are played here'. Do not use it for drums or full mixes (the result is unreliable), to read an existing MIDI file (midi_read) or to measure pitch frame by frame (audio_pitch). Example: {"path": "melody.wav", "context": "song.sonare.json", "quantize_ppq": 0.25}. |
| audio_playA | Plays an audio file, or one window of it given as range, on the speakers of the machine running this server, so the human user can listen; the agent cannot hear it. Playback starts in the background and the call returns at once with the process id; action 'stop' ends the playbacks this server started and nothing else. Use it when the user asks to play, hear, listen to or audition a file or a section, such as 'play the chorus'. Not for measurements (use audio_analyze, audio_loudness or audio_visualize, which return numbers and images). Players started before a server restart can no longer be stopped by this tool. Example: {"action": "play", "path": "song.wav", "range": {"start_sec": 30, "end_sec": 60}}. |
| audio_deviceA | 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}. |
| midi_readA | Lists what is inside a Standard MIDI File, a project file's MIDI tracks or inline tracks: tracks with channel, General MIDI instrument, note count and pitch range, the tempo (BPM) map, time signatures, length in quarter notes (PPQ), and a paged piano-roll note table. Use it to inspect a .mid file before editing or placing it on a project track, or to check what another tool wrote. Not for audio files (use audio_analyze or audio_transcribe) and not for changing the music (use midi_edit). Example: {"source": "song.mid", "detail": "full", "range": {"start_ppq": 0, "end_ppq": 16}}. |
| midi_writeA | Writes inline tracks (with an optional tempo map and time signatures), or a project file's tracks and tempo map, as a Standard MIDI File. Use it to turn notes you composed as JSON into a playable .mid file, or to export a project for another program. Not for changing the music (use midi_edit) and not for generating music (use midi_compose); to hear it, put the .mid on a project track with project_edit addMidiClip and call project_render. Example: {"source": [{"name": "lead", "program": 80, "notes": [{"pitch": 60, "start_ppq": 0, "length_ppq": 1}]}], "output": "lead.mid"}. |
| midi_editA | Transforms notes with an ordered list of operations: transpose (semitones, interval, or to a key), quantize with swing, humanize, change velocity, filter notes, fold into an instrument range, invert or reverse, arpeggiate, and apply the groove of another file; on a .mid file or inline tracks also merge tracks, split a track by pitch, retime, set one tempo and set the program. A project file is rewritten in place (or into 'output'); a .mid file or inline tracks give a new .mid. Use it for any change to existing notes; pass 'track' to touch one track, and drums are skipped by transpose, transform, arpeggiate, foldToRange, splitByPitch and setProgram. Track, tempo and program changes on a project belong to project_edit (addTrack, setTempoSegments, setProgram). Not for reading (use midi_read). Example: {"source": "song.mid", "ops": [{"op": "transpose", "shift_semitones": -2}, {"op": "quantize", "grid": "1/16", "strength_ratio": 0.8}]}. |
| project_createA | Creates a project file (.sonare.json): the workspace that carries one song between tools. Each audio input becomes an audio track, each .mid input its tracks; 'overlay' starts all inputs together, 'sequence' plays them in turn with an optional crossfade. 'analyze' derives tempo, meter, key, chords and sections from an audio input into the project's tempo map and annotations, and the response lists the tempo candidates. Without 'analyze' the tempo map and meter come from the first .mid input; every .mid input adds its tracks under the project's maps. Use it as the first step of arranging, mixing or rendering a song. Do not use it to edit an existing project (project_edit). Example: {"inputs": [{"path": "song.wav"}], "analyze": ["tempo", "key", "chords"]}. |
| project_readA | Reads a project file: tracks (gain, pan, mute, solo, instrument), clips (positions in PPQ with their seconds), sources (path, resolved, hash match, orphan), tempo map, time signatures, markers and annotations. 'list' returns one list paged by offset and limit. Use it to find track, clip and source ids before project_edit, or to see where a section lies in seconds. Do not use it to read notes (midi_read). Example: {"path": "song.sonare.json", "list": "clips", "limit": 50}. |
| project_editA | Applies a batch of ops to a project file: tracks (addTrack, removeTrack, renameTrack, setTrack, setTrackRoute, setInstrument, setPartRig), clips (addAudioClip, addMidiClip, setClipSource, moveClip, trimClip, splitClip, duplicateClip, removeClip, setClip, setProgram, setOverlapPolicy), sources (relinkSource), the mixer scene (setMixerScene, suggestMix, setStrip, addBus, removeBus, addSend, removeSend, addVcaGroup, removeVcaGroup, setSidechain), tempo and meter (setTempoSegments, setTimeSignatures), annotations (annotateKeys, annotateChords, annotateSections, setMarker) and automation (addAutomationLane, editAutomationLane, removeAutomationLane, automationFromMidiCc). All ops succeed or nothing is written; an op can address what an earlier op created as {"op": n}, and the response lists created ids. The file is updated in place; pass 'output' or 'dry_run' to keep it. Notes are written with midi_write or midi_compose and placed with addMidiClip; read results with project_read. Example: {"path": "song.sonare.json", "ops": [{"op": "addTrack", "kind": "midi", "name": "bass"}, {"op": "addMidiClip", "track": {"op": 0}, "path": "bass.mid"}, {"op": "setTrack", "track": "bass", "gain_db": -6}]}. |
| project_renderA | 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"}. |
| theory_analyzeA | Analyses a .mid file, a project file, an audio file, inline notes or chord labels: the key (with runner-up readings), key changes, the chord per segment, Roman numerals, cadences, phrases, a reduced progression, the rhythm and recurring motifs, each with the library's rationale; a reading that cannot be made is reported as undetermined. Audio gives the chord-level aspects only (from its key and chord estimates); for its notes, transcribe it with audio_transcribe first. Positions are quarter notes (_ppq). Not for one chord, scale or interval fact (use theory_lookup) or for rule checks (use theory_check). Example: {"chords": [{"symbol": "C", "start_ppq": 0, "end_ppq": 4}, {"symbol": "G7", "start_ppq": 4, "end_ppq": 8}, {"symbol": "C", "start_ppq": 8, "end_ppq": 12}], "aspects": ["key", "roman", "cadences"]}. |
| theory_lookupA | Calls one libcantus music-theory function by its Python name with arguments by parameter name and returns the library's result unchanged under 'result' (libcantus's own camelCase keys). Covers chord and key parsing and spelling, scales, intervals, Roman numerals, chord scales, substitutions, key relations, transposition, note, MIDI and frequency conversion, instrument ranges, tempo and duration math, and generators that take plain data. List the functions and their parameters with music_catalog kind 'theoryOps'. Functions that need handles, callbacks or model instances are refused; use theory_analyze, theory_check or midi_compose for those. Example: {"op": "transpose_chord_symbol", "args": {"text": "Am7", "semitones": 2}}. |
| theory_checkA | Checks music against rules: four-part writing (parallel fifths and octaves, spacing, voice crossing), species counterpoint (species 1-5 against a cantus firmus), whether a bass, guitar or drum part is playable (range, stretch, limb conflicts, difficulty), and the voice-leading cost between two voicings. Violations come back as kind, voices, from_index, to_index and a rationale. Not for naming the harmony (use theory_analyze) or for looking up facts (use theory_lookup). Example: {"check": {"kind": "partWriting", "voicings": [["C3","G3","E4"],["D3","A3","F4"]], "chords": ["C","Dm"], "key": "C major"}}. |
| midi_composeA | Generates music from a key, length and seed: a chord progression, voicings, a bass line, drums, a melody, a motif, a rhythm, a counter-melody to a given melody, chords for a given melody (harmonize), or a ready backing (chords, bass and drums in one file). Writes a .mid; the same arguments and seed always give identical files. Pass 'context' (a song's audio, .mid or project file) to take tempo, meter, key, chords and length from it, so the part fits the song and the file's tempo map equals the song's. Use it for 'make a chord progression', 'add a bass line', 'drum pattern' or a quick accompaniment; Inputs per part: progression {key, style, bars}; bass {chords, style}; drums {style, bars}; counterMelody {melody, chords?}; melody {melody? as the reference}; motif {key, bars, style = contour}; rhythm {time_signature, bars}; harmonize {melody}; voicing {chords, style}; backing {key, style, bars}. Not for changing existing notes (use midi_edit), for analyzing chords (use theory_analyze) or for audio (put the .mid on a project track with project_edit addMidiClip, then project_render). Example: {"part": "bass", "context": "song.sonare.json", "seed": 7}. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 34 tools
Most tools target clearly distinct resources or actions, and descriptions proactively redirect to alternatives such as audio_info vs audio_loudness or audio_process vs audio_master. A few boundaries still blur, especially audio_analyze vs theory_analyze on audio and audio_info vs audio_loudness, so not every tool is perfectly separable.
All names use snake_case with predictable domain prefixes (audio_, midi_, project_, theory_, music_) and readable action/resource suffixes. Some tools are noun-like (audio_info, audio_features, music_catalog) while others are verb-like (audio_analyze, midi_compose), a minor inconsistency but still easy to follow.
34 tools is well above both the 3-15 sweet spot and the 16-25 heavy range, creating substantial selection overhead even for a broad audio/MIDI production suite. Several workflow families could likely be consolidated or exposed as sub-operations rather than top-level tools.
The surface covers the full lifecycle: inspection and analysis, diagnosis and repair, processing and mastering, editing and splitting, separation, transcription and vocal tuning, playback and device I/O, MIDI read/write/edit/compose, project CRUD/render, and theory lookup/analyze/check. No obvious workflow dead ends are present.