Skip to main content
Glama

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
NameRequiredDescriptionDefault
clip_indexYes
lengthNo
track_indexYes

Implementation Reference

  • 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)}"
  • The @mcp.tool() decorator registers the create_clip function as an MCP tool, automatically generating schema from type hints.
    @mcp.tool()
  • 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" ]

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Milesy1/MCP-Ableton-API'

If you have feedback or need assistance with the MCP directory API, please join our Discord server