set_clip_name
Rename clips in Ableton Live by specifying the track index, clip index, and new name. Integrates with AI-assisted music production workflows via AbletonMCP server.
Instructions
Set the name of a clip.
Parameters:
track_index: The index of the track containing the clip
clip_index: The index of the clip slot containing the clip
name: The new name for the clip
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| clip_index | Yes | ||
| name | Yes | ||
| track_index | Yes |
Implementation Reference
- MCP_Server/server.py:371-392 (handler)MCP tool handler for 'set_clip_name'. Proxies the command to the Ableton remote script via socket, including input parameters validation via type hints and docstring schema.@mcp.tool() def set_clip_name(ctx: Context, track_index: int, clip_index: int, name: str) -> str: """ Set the name of a clip. Parameters: - track_index: The index of the track containing the clip - clip_index: The index of the clip slot containing the clip - name: The new name for the clip """ try: ableton = get_ableton_connection() result = ableton.send_command("set_clip_name", { "track_index": track_index, "clip_index": clip_index, "name": name }) return f"Renamed clip at track {track_index}, slot {clip_index} to '{name}'" except Exception as e: logger.error(f"Error setting clip name: {str(e)}") return f"Error setting clip name: {str(e)}"
- Actual Ableton Live API implementation that sets the clip name using Live's Python API (song.tracks[track_index].clip_slots[clip_index].clip.name = name). Called by the MCP server via socket command.def _set_clip_name(self, track_index, clip_index, name): """Set the name of a clip""" try: if track_index < 0 or track_index >= len(self._song.tracks): raise IndexError("Track index out of range") track = self._song.tracks[track_index] if clip_index < 0 or clip_index >= len(track.clip_slots): raise IndexError("Clip index out of range") clip_slot = track.clip_slots[clip_index] if not clip_slot.has_clip: raise Exception("No clip in slot") clip = clip_slot.clip clip.name = name result = { "name": clip.name } return result except Exception as e: self.log_message("Error setting clip name: " + str(e)) raise
- AbletonMCP_Remote_Script/__init__.py:257-261 (registration)Dispatch/registration point in the Ableton remote script where incoming 'set_clip_name' socket commands are routed to the _set_clip_name handler.elif command_type == "set_clip_name": track_index = params.get("track_index", 0) clip_index = params.get("clip_index", 0) name = params.get("name", "") result = self._set_clip_name(track_index, clip_index, name)