create_midi_track
Add a MIDI track to your Ableton Live session for composing melodies, chords, and drum patterns. Specify the track position to organize your musical arrangement.
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": "create_midi_track"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| index | No |
Implementation Reference
- MCP_Server/server.py:273-281 (handler)The main handler function for the MCP tool 'create_midi_track'. It connects to the Ableton remote script and sends the create_midi_track command with the specified index (default -1). Returns a success message with the new track name or error.
@mcp.tool() def create_midi_track(ctx: Context, index: int = -1) -> str: try: ableton = get_ableton_connection() result = ableton.send_command("create_midi_track", {"index": index}) return f"Created new MIDI track: {result.get('name', 'unknown')}" except Exception as e: logger.error(f"Error creating MIDI track: {str(e)}") return f"Error creating MIDI track: {str(e)}"