fire_clip_tool
Activate a specific clip in Ableton Live by specifying track and clip indices, enabling precise control over music production workflows via AI integration.
Instructions
Start playing a clip.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| clip_index | Yes | ||
| track_index | Yes |
Implementation Reference
- MCP_Server/server.py:116-119 (handler)The primary MCP tool handler named 'fire_clip_tool'. It registers the tool via @mcp.tool() and executes by calling the fire_clip helper function.@mcp.tool() def fire_clip_tool(ctx: Context, track_index: int, clip_index: int) -> str: """Start playing a clip.""" return fire_clip(ctx, track_index, clip_index)
- MCP_Server/tools/clip_tools.py:81-95 (helper)Helper function that sends the 'fire_clip' command to the Ableton remote script connection.def fire_clip(ctx: Context, track_index: int, clip_index: int) -> str: """ Start playing a clip. Parameters: - track_index: The index of the track containing the clip - clip_index: The index of the clip slot containing the clip """ try: ableton = get_ableton_connection() result = ableton.send_command("fire_clip", {"track_index": track_index, "clip_index": clip_index}) return f"Started playing clip at track {track_index}, slot {clip_index}" except Exception as e: logger.error(f"Error firing clip: {str(e)}") return f"Error firing clip: {str(e)}"
- Core implementation in the remote script that interacts with Ableton Live API to fire the clip slot.def fire_clip(self, track_index: int, clip_index: int) -> dict[str, Any]: """Fire a clip""" try: clip_slot = self.get_clip_slot(track_index, clip_index) if not clip_slot.has_clip: raise Exception("No clip in slot") # Fire the clip clip_slot.fire() result = {"fired": True, "name": clip_slot.clip.name} return result except Exception as e: self.log_message("Error firing clip: " + str(e)) raise