copy_clip
Copies audio or MIDI clips between tracks in Ableton Live sessions to rearrange musical elements or duplicate patterns.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| source_track | Yes | ||
| source_clip | Yes | ||
| target_track | Yes | ||
| target_clip | Yes |
Implementation Reference
- MCP_Server/server.py:604-617 (handler)The main handler function for the 'copy_clip' MCP tool. Decorated with @mcp.tool() for automatic registration and schema inference from type hints. Sends a 'copy_clip' command to the Ableton connection with the provided track and clip indices, and returns a descriptive success or error message.@mcp.tool() def copy_clip(ctx: Context, source_track: int, source_clip: int, target_track: int, target_clip: int) -> str: try: ableton = get_ableton_connection() result = ableton.send_command("copy_clip", { "source_track": source_track, "source_clip": source_clip, "target_track": target_track, "target_clip": target_clip }) return f"Copied clip '{result.get('clip_name')}' from track {source_track}, slot {source_clip} to track {target_track}, slot {target_clip}" except Exception as e: logger.error(f"Error copying clip: {str(e)}") return f"Error copying clip: {str(e)}"
- MCP_Server/server.py:604-604 (registration)The @mcp.tool() decorator registers the copy_clip function as an MCP tool, using its signature for input schema.@mcp.tool()