set_clip_name_tool
Rename clips in Ableton Live by specifying track index, clip index, and desired name, enabling precise control over music production workflows.
Instructions
Set the name of a clip.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| clip_index | Yes | ||
| name | Yes | ||
| track_index | Yes |
Implementation Reference
- MCP_Server/tools/clip_tools.py:60-78 (handler)Core handler function that executes the tool logic by sending a 'set_clip_name' command to the Ableton remote script via the connection and returns a success or error message.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)}"
- MCP_Server/server.py:110-113 (registration)Registers the MCP tool named 'set_clip_name_tool' using the @mcp.tool() decorator, which wraps and delegates to the set_clip_name handler function.@mcp.tool() def set_clip_name_tool(ctx: Context, track_index: int, clip_index: int, name: str) -> str: """Set the name of a clip.""" return set_clip_name(ctx, track_index, clip_index, name)