Skip to main content
Glama

stop_clip_tool

Halt playback of a specific clip in Ableton Live by specifying the track and clip index using the MCP server for AI-assisted music production.

Instructions

Stop playing a clip.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
clip_indexYes
track_indexYes

Implementation Reference

  • Primary MCP tool handler for 'stop_clip_tool'. Decorated with @mcp.tool() for registration and executes by calling the helper stop_clip function.
    @mcp.tool() def stop_clip_tool(ctx: Context, track_index: int, clip_index: int) -> str: """Stop playing a clip.""" return stop_clip(ctx, track_index, clip_index)
  • Helper function imported and called by the MCP tool handler. Sends the 'stop_clip' command to the Ableton remote script connection.
    def stop_clip(ctx: Context, track_index: int, clip_index: int) -> str: """ Stop 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("stop_clip", {"track_index": track_index, "clip_index": clip_index}) return f"Stopped clip at track {track_index}, slot {clip_index}" except Exception as e: logger.error(f"Error stopping clip: {str(e)}") return f"Error stopping clip: {str(e)}"
  • Backend handler in the Ableton Remote Script that receives the 'stop_clip' command and executes clip_slot.stop() on the Ableton Live API.
    def stop_clip(self, track_index: int, clip_index: int) -> dict[str, Any]: """Stop 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") # Stop the clip clip_slot.stop() result = {"stopped": True, "name": clip_slot.clip.name} return result except Exception as e: self.log_message("Error stopping clip: " + str(e)) raise

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/chaudepark/ableton-mcp'

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