Skip to main content
Glama
libsonare-mcp

libsonare-mcp

Official
by libraz

Transcribe audio to MIDI

audio_transcribe
Destructive

Converts pitched audio—such as melodies, bass lines, or piano parts—into notes and writes a Standard MIDI File, optionally aligned to a project tempo map and quantized.

Instructions

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}.

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

Input Schema

NameRequiredDescriptionDefault
pathYesInput audio file path.
rangeNoOnly transcribe this window ({start_sec, end_sec}, in seconds); notes keep the file's own times. Omit for the whole file.
detailNo'concise' returns the summary and the most useful fields; 'full' returns all.concise
outputNoThe .mid file to write. Default: '<input stem>.transcribe.mid'.
contextNoA project file (.sonare.json) whose tempo map and time signatures the .mid is written with, so it lines up with the project. Excludes tempo_bpm.
dry_runNoReport what would be written, with the planned path, only.
overwriteNoReplace an existing file at 'output' (default false).
tempo_bpmNoA constant tempo for the .mid (quarter notes per minute). Default: the context's tempo map, else one derived from the audio.
polyphonicNoTrack several simultaneous notes (slower; for chords and piano). The default follows a single melodic line.
quantize_ppqNoSnap notes to this grid in quarter notes (0.25 = sixteenths). Default: off.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already flag a mutating, destructive, non-idempotent operation; the description goes beyond that by stating a file is written, that return content is a note count plus the first rows of the note table in seconds, that the output aligns to a project's tempo map and grid, and that polyphonic tracking is slower. It doesn't discuss failure modes for unreadable or unsupported audio, which keeps it below a 5.

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 outcome, then the project-integration behavior, the exclusion list, and a compact example; no filler sentences. Slightly dense with semicolon-chained clauses, but every sentence carries usable routing or behavioral information.

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 10-parameter, no-output-schema tool with destructive annotations, the description covers what is produced (a .mid plus a note table preview), how it integrates with the project, and when not to use it. An agent has everything needed to call it correctly without guessing at defaults.

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 coverage is 100%, so every parameter is already documented, and most description content (context tempo map, quantize_ppq snapping, tempo derived from audio) restates schema text. The example object showing path/context/quantize_ppq together adds modest practical value, consistent with the baseline 3.

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?

States a specific verb and resource: 'Converts pitched audio ... into notes and writes a Standard MIDI File', with concrete examples of the input domain (melody, bass line, piano part). It also separates itself from sibling tools by name (midi_read for existing MIDI, audio_pitch for frame-by-frame pitch), so an agent can pick it without opening another 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?

Gives explicit when-to-use phrasing ('turn this recording into MIDI', 'what notes are played here') and explicit when-not conditions ('Do not use it for drums or full mixes (the result is unreliable)') with the correct alternatives named. The downstream workflow (project_edit 'addMidiClip' with a context file) is also spelled out.

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