Skip to main content
Glama

import_midi_file

Import MIDI file notes into an Ableton clip, optionally inspecting tracks and channels first, then target a Session slot or Arrangement clip.

Instructions

Import the notes of a Standard MIDI File (.mid) into a clip. Without track_index, only describes the file (tracks, note counts, channels, length) so you can pick midi_track / channel first.

Session: an empty slot gets a new clip as long as the notes (rounded up to a 4-beat bar) or clip_length; an existing clip receives the notes (after clearing it when replace=True). Arrangement: the clip must exist (index from get_arrangement_clips). Times are in beats; the file's tempo is ignored.

Parameters:

  • file_path: Absolute path of the .mid file

  • track_index: Target MIDI track (omit to only describe the file)

  • clip_index: Session slot, or Arrangement clip index

  • midi_track: Track of the MIDI file to import (default: all, merged)

  • channel: MIDI channel to keep, 0-15 (default: all)

  • transpose: Semitones to add to every pitch

  • location: "session" (default) or "arrangement"

  • replace: Clear the target clip's notes first

  • clip_length: Length in beats of a newly created Session clip

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": {
      "file_path": "<file_path>"
    },
    "name": "import_midi_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
channelNo
replaceNo
locationNosession
file_pathYes
transposeNo
clip_indexNo
midi_trackNo
clip_lengthNo
track_indexNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.1.1

TDQS

A4.7/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and mostly succeeds: it discloses that an empty slot is sized to the notes rounded up to a 4-beat bar or clip_length, that replace=True clears existing notes, that arrangement targets must pre-exist, and that the file's tempo is ignored with times in beats. It does not mention permission/undo implications or what happens on partial failures, which keeps it short of 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 purpose, then destination-specific behavior, then a scannable parameter list — every section earns its place. The parameter block partially restates schema field names, but each entry adds meaning the schema lacks, so the redundancy is justified rather than wasteful.

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 9-parameter mutation tool with no annotations, the description covers mode selection, destination-specific constraints, index sourcing, timing units, tempo handling, and parameter defaults; an output schema exists, so return values need not be described. Nothing essential to calling it correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% and all nine parameters are titled only, so the description must compensate — and it does, defining each one with defaults and semantics (midi_track default all merged, channel 0-15 default all, transpose in semitones, location session/arrangement, clip_index meaning both a Session slot and an Arrangement clip index, clip_length in beats for new Session clips).

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 first sentence names a specific verb and resource: 'Import the notes of a Standard MIDI File (.mid) into a clip.' It immediately clarifies the dual mode (describe-only when track_index is omitted), which distinguishes it from siblings like analyze_audio_file or add_notes_to_clip without needing to open a 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?

It gives explicit when-to guidance: omit track_index first to inspect tracks/channels, then import with a chosen midi_track/channel. It also states preconditions per destination (Session: empty slot or existing clip; Arrangement: clip must already exist, index sourced from get_arrangement_clips), naming the sibling that provides the index.

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

Deploy Server

Other Tools