Read a MIDI file or project
midi_readInspect Standard MIDI files or inline tracks to list tracks, channels, instruments, notes, tempo, time signatures, and piano-roll data before editing or verifying generated output.
Instructions
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}}.
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": "midi_read"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum number of note rows to return (1-1000, default 200). | |
| range | No | Only list notes starting inside this window (quarter notes). Omit for all. | |
| track | No | Track to use: its id (integer from 1) or its unique name. Omit for every track. | |
| detail | No | 'concise' returns the summary and the most useful fields; 'full' returns all. | concise |
| offset | No | Index of the first note row to return. | |
| source | Yes | A .mid/.midi file path, a project file path (.sonare.json) or inline tracks [{name?, program?, channel?, is_drum?, notes: [{pitch, start_ppq, length_ppq, velocity}]}]. Track ids of a file are the core's (1, 2, ...); inline tracks count from 1. |