create_clip
Create MIDI or audio clips in Ableton Live tracks to build musical arrangements. Specify track position, clip location, and duration to generate content for music production workflows.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| clip_index | Yes | ||
| length | No | ||
| track_index | Yes |
Implementation Reference
- MCP_Server/server.py:294-305 (handler)The handler function for the 'create_clip' MCP tool. It connects to the Ableton remote script and sends a 'create_clip' command with the provided track_index, clip_index, and length parameters, returning a success or error message.def create_clip(ctx: Context, track_index: int, clip_index: int, length: float = 4.0) -> str: try: ableton = get_ableton_connection() result = ableton.send_command("create_clip", { "track_index": track_index, "clip_index": clip_index, "length": length }) return f"Created new clip at track {track_index}, slot {clip_index} with length {length} beats" except Exception as e: logger.error(f"Error creating clip: {str(e)}") return f"Error creating clip: {str(e)}"
- MCP_Server/server.py:293-293 (registration)The @mcp.tool() decorator registers the create_clip function as an MCP tool, automatically generating schema from type hints.@mcp.tool()
- MCP_Server/server.py:104-110 (helper)Helper logic in send_command that treats 'create_clip' as a modifying command, applying special timeout and delay handling for reliable execution.is_modifying_command = command_type in [ "create_midi_track", "create_audio_track", "set_track_name", "create_clip", "add_notes_to_clip", "set_clip_name", "set_tempo", "fire_clip", "stop_clip", "set_device_parameter", "start_playback", "stop_playback", "load_instrument_or_effect", "load_browser_item" ]