Skip to main content
Glama

Export a MIDI file

export_midi

Saves MIDI clips as a Standard MIDI File (.mid) for use in another program. Export all tracks with notes, or a single track or clip, with the song's tempo, time signature and channel data.

Instructions

Saves MIDI clips as a Standard MIDI File (.mid), like File > Export MIDI File: for another program, or for someone to play. Without track: every MIDI track that has notes, one track each in the file, from the start of the song. With track: just that track; with clip too, just that clip, measured from the bar it starts in. The file has the song's tempo and time signature, each track's name and MIDI channel, and the clips' notes, controllers and pitch bend: notes, not sound (an instrument's sound isn't in a MIDI file). Without path it goes in the song's Exports folder. A file already there is never replaced. Doesn't change the song.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "export_midi"
  }
}

Input Schema

NameRequiredDescriptionDefault
clipNoWith track: one clip's id (describe_track lists them)
pathNoOptional: the .mid file's full path (or ~/...), only when the person asks for a place. Default: the song's Exports folder
trackNoA MIDI track (name or id). Without it: every MIDI track

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the annotations it discloses the concrete side effects an agent needs: the default output location (the song's Exports folder), collision behavior ('A file already there is never replaced'), and that the song itself is unmodified. It also describes the file's payload (tempo, time signature, track names, channels, notes, controllers, pitch bend), which is exactly the kind of context annotations cannot carry. This is consistent with readOnlyHint=false and destructiveHint=false — it writes a new file but destroys nothing.

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 scope rules lead and the aggregate point ('notes, not sound') is front-loaded; nearly every clause carries distinct information about scoping, output, or side effects. It is a dense single paragraph, though, and could be broken into bullets to make the three export modes easier to scan.

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?

With no output schema, the description still tells the agent what the produced file contains and where it lands, plus what happens on name collisions and that the project is left untouched. For a three-parameter, all-optional export tool, nothing an agent needs in order to call it correctly is missing.

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 the baseline is 3, but the description adds real meaning on top: `clip` timing is defined as 'measured from the bar it starts in', `path` is constrained to cases where the person asks, and `path` has a stated default. These are semantic refinements, not restatements of the schema text.

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 description states a specific verb and resource ('Saves MIDI clips as a Standard MIDI File (.mid)') and immediately anchors it to a familiar UI action ('like File > Export MIDI File'). It also clarifies the boundary against audio export by noting the file contains 'notes, not sound', so an agent can distinguish it from export_audio without opening either schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives explicit selection rules between its own modes: no `track` exports every MIDI track, `track` alone exports one track, and `track` + `clip` exports a single clip measured from its starting bar. It also scopes the `path` parameter ('only when the person asks for a place'). It stops short of naming a sibling alternative such as export_audio by name, leaving that routing to inference.

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