← MidiPilot overview

MidiPilot AI Tools Reference

In Agent mode the model does its work through tools: it inspects the file, writes events, and checks the result by calling them one after another. This page lists every tool with what it does, and points at the MCP server that hands the same set to external AI clients.


AI Tools Reference

In Agent mode, the AI has access to 38 tools (32 core + switch_document + 5 FFXIV-specific) for inspecting and modifying MIDI files and for creating, opening, saving and closing documents. The 32 core tools are the same ones exposed over the MCP server; switch_document is the one tool each side defines for itself, because it behaves differently there (see its row below):

ToolDescription
get_editor_stateRead file info, tracks, tempo, time signature, cursor position, and the selected-event count
get_track_infoGet detailed info for a specific track: name, assigned channel, total event count, and how many of those are notes
get_selectionRead the user's current selection as full events, each with a 0-based index (the index delete_events_by_index expects)
list_documentsList every open document (tab) across both editor groups: index, title, file path, group, and active/modified flags - the index the other document tools expect
get_document_overviewRead a summary of another open tab without switching to it: duration, tracks with their names, note and event counts, channels in use, and the tempo and time-signature event counts
create_trackCreate a new MIDI track
rename_trackRename an existing track
set_channelSet the MIDI channel for a track
remove_trackDelete a track and all its events (cannot remove the file's last track)
insert_eventsAdd new MIDI events (notes, control changes, etc.)
replace_eventsModify existing events in a range
delete_eventsDelete events in a tick range on a track - all of them, or only chosen kinds (notes, controllers, pitch bends, program changes), e.g. just the program change at tick 0 while its controllers stay
delete_events_by_indexDelete specific events from the current selection by 0-based index (e.g. every second selected note)
query_eventsRead events in a tick range on a track, optionally only chosen kinds
move_events_to_trackMove events between tracks
transpose_eventsTranspose notes by semitones - a track, a tick range, or the whole file - as one undo step, optionally folded octave-wise into the bard range C3-C6
split_chords_to_tracksSplit a track's chords voice-wise onto new tracks (voice 1 = highest note) - the standard way to turn a chordal part into monophonic FFXIV performers
copy_events_to_trackCopy notes to another track, optionally restricted to a tick range - e.g. double a melody onto a second performer, then transpose the copy
import_tracks_from_documentCopy whole tracks from another open tab into the document being edited - appended as new tracks with their names preserved, the source untouched. Ticks are rescaled when the two files' resolutions differ; channel collisions and differing tempo maps are reported. Defaults to a dry run and requires the user's confirmation before the real pass; one undo step restores everything
switch_documentPoint the rest of the run at another open tab: from the next tool call on, every read and write acts on that document and its undo steps land there. The chat announces the switch, the visible tab stays put, and the agent switches only when you explicitly ask it to work on another tab
save_documentSave the document being edited, without a dialog: into the file you opened when you say so, otherwise as a marked copy next to it - see Saving and opening documents
save_document_asSave the document as a new marked file under another name - also how the AI "renames" a document; the previous file stays where it is
new_documentCreate an empty, untitled document in a new tab, optionally with a chosen resolution (ticks per quarter note)
open_documentOpen a MIDI file or an importable file (Guitar Pro, MusicXML, MuseScore, MML) in a new tab; a file that is already open is reported instead of opened twice
close_documentClose a tab that has no unsaved changes
search_helpSearch the built-in manual - for questions about the editor itself ("how do I split drums?"), the AI looks the answer up instead of guessing
get_help_sectionRead one manual section's full text; the answer cites the page so you can click through
set_tempoChange the tempo - in BPM (fractions allowed, e.g. 117.5) or exactly in microseconds per quarter note, the unit MIDI files store
get_timing_mapRead the complete timing data with exact values: resolution, every tempo change (in microseconds per quarter note, with the BPM and the time in milliseconds), every time signature and key signature, and markers and text events with their ticks - what the AI needs to rebuild a tempo or meter map exactly in another document
set_time_signatureChange the time signature
convert_tempo_preserve_durationRe-tempo material while keeping its real-time duration - scales event ticks and updates the tempo map so e.g. a 90 BPM vocal line fits a 180 BPM project with the bars lining up again. Works on the whole file, chosen tracks or channels, or the current selection; defaults to a dry run and requires the user's confirmation before the real pass
thin_tempo_mapReduce a dense DAW-exported tempo ramp to the events that carry the timing - you set how far the music may move in milliseconds (default 2 ms) and every point of the piece stays inside that corridor. The corridor is a budget per open document, measured against the tempo map the file was opened with: running the tool again at the same tolerance therefore removes nothing more, and the millisecond figures it reports are always the total distance from the file as loaded. Defaults to a dry run that reports the before/after counts; one undo step restores the full map.
set_ffxiv_modeTurn FFXIV Bard Performance mode on or off - the five FFXIV tools below appear and disappear with it, and get_editor_state reports the current state as ffxivMode
setup_channel_patternAuto-configure MidiBard2 channel mapping (FFXIV) and set every note's velocity to 127, as FFXIV plays no dynamics. Applies the same check as Fix X|V Channels and reports the reason instead of running when the file is not an FFXIV MIDI; chooses Rebuild or Preserve by the same rules as the Fix X|V Channels dialog and lists guitar notes on channels without a guitar program, which get no switch
convert_drums_ffxivConvert GM drum kit to FFXIV-compatible tone-mapped notes
validate_ffxivCheck FFXIV Bard Performance rule compliance: every same-tick note collision and stacked duplicate with its tick, notes outside C3-C6, and track names matching no FFXIV instrument - the same engine as Tools → Check FFXIV Playability, see Check FFXIV Playability
analyze_voice_loadRead-only audit of the FFXIV 16-voice ceiling and 14 notes/sec/channel rate cap. Returns globalPeak, overflowRanges and rateHotspots - see FFXIV Voice Limiter
auto_fit_voice_loadThe matching action tool: thins overloaded moments and over-dense passages (whole file or a tick range). Defaults to a dry run and requires the user's confirmation before the real pass - see Auto-Fit Voice Load

Saving and opening documents

MidiPilot and MCP clients can create, open, save and close documents themselves. None of these tools opens a dialog. A file you opened is only written over when you say so; everything else the AI saves is a marked copy:

MidiPilot transposed the song and asks whether to overwrite the opened MIDI file or save a copy; the save step waits for the answer After the answer "save as a copy" MidiPilot saves a marked copy, the tab continues on it and the original stays unchanged
Saving a file you opened - MidiPilot asks first and saves nothing until you answer (left); after your answer it saves the copy and says where (right)

Saving, opening and closing are not undo steps. You see them in the tab title, as a status-bar message, and - for MidiPilot - as a chat line with the saved path. File → Save and Save As keep their dialogs; the rules above apply to the AI tools only.


MCP Server - External AI Clients

MidiEditor AI includes a built-in MCP (Model Context Protocol) server that exposes the same 32 core tools MidiPilot uses, plus its own variant of switch_document - one that also brings the chosen tab to the front - and the five FFXIV tools whenever FFXIV mode is on. Instead of using the built-in chat panel, you can connect Claude Desktop, VS Code Copilot, Cursor, Windsurf, or any other MCP-compatible client and let it edit your MIDI files directly.

Enable the MCP server in Settings → MidiPilot AI → MCP Server, copy the config JSON, paste it into your AI client, and you’re ready. All tool calls appear in the Protocol panel with the client name (e.g. “MidiPilotMCP (VS Code Copilot Claude Opus 4.6)”) and support full undo.

📖 Full MCP Server Documentation →


See also