> ## Documentation Index
> Fetch the complete documentation index at: https://docs.clickwheel.fm/llms.txt
> Use this file to discover all available pages before exploring further.

# Playlists

> clickwheel MCP server tools for Playlists.

**Try asking Claude**

* *"What playlists do I have?"*
* *"Build a 45-minute late-night indie folk playlist."*
* *"Add Nirvana to my road-trip playlist."*

## `add_artist_to_playlist`

Add every track by `artist` to `playlist` (skipping duplicates). Creates the playlist if it doesn't already exist. Returns the number of tracks actually added.

<ParamField path="playlist" type="string" required>
  Playlist name (created if missing).
</ParamField>

<ParamField path="artist" type="string" required>
  Artist name (exact match).
</ParamField>

## `add_tracks_to_playlist`

Append specific tracks to a saved playlist, preserving the given order. Creates the playlist if it doesn't exist. Tracks already in the playlist, FLAC files, and files flagged missing on disk are silently skipped. Returns the number of tracks actually added.

<ParamField path="playlist" type="string" required>
  Playlist name (created if missing).
</ParamField>

<ParamField path="track_paths" type="string[]" required>
  Absolute file paths from the library, in the order they should be appended. Get these from list\_tracks\_by\_album, list\_playlist\_tracks, or search\_tracks. Never invent paths.
</ParamField>

## `create_playlist`

Create a new named playlist with the given track paths. Errors if one with the same name already exists; use `update_playlist` to replace contents instead.

<ParamField path="name" type="string" required>
  New playlist name (must not exist).
</ParamField>

<ParamField path="track_paths" type="string[]" required>
  Absolute file paths from the library. Get these from list\_tracks\_by\_album or search\_tracks. Never invent paths.
</ParamField>

<ParamField path="description" type="any">
  Optional free-text description. Shown in playlist listings and carried over to Plex as the playlist summary when synced via sync\_playlist\_to\_plex.
</ParamField>

## `delete_playlist`

Permanently delete a saved playlist. Cannot be undone. The playlist record is removed; the underlying music files are untouched.

<ParamField path="name" type="string" required>
  Playlist name.
</ParamField>

## `get_playlist`

Summary of one playlist: total track count, total size, and the artist breakdown (with track count + size per artist). Does NOT return the full track list. Use `list_playlist_tracks` to page through tracks.

<ParamField path="name" type="string" required>
  Playlist name.
</ParamField>

## `heal_playlist`

Drop references in a playlist to tracks whose files are no longer on disk (flagged missing by `clickwheel scan`). Returns the number dropped, the number remaining, and the list of removed track records.

<ParamField path="name" type="string" required>
  Playlist name.
</ParamField>

## `list_playlist_tracks`

Paginated list of tracks in a saved playlist, in playlist order. Returns full track records (artist, title, album, path, duration, file\_size, format). The `path` values are needed if you're going to pass them to `update_playlist`.

<ParamField path="name" type="string" required>
  Playlist name.
</ParamField>

<ParamField path="limit" type="integer" default="50">
  Max tracks to return.
</ParamField>

<ParamField path="offset" type="integer">
  Pagination offset (0 = first page).
</ParamField>

## `list_playlists`

All saved playlists with track counts, total size in bytes, and last-updated timestamps.

## `remove_artist_from_playlist`

Remove every track by `artist` from `playlist`. Returns the number of tracks removed (0 if the artist wasn't in the playlist).

<ParamField path="playlist" type="string" required>
  Playlist name.
</ParamField>

<ParamField path="artist" type="string" required>
  Artist name (exact match).
</ParamField>

## `remove_tracks_from_playlist`

Remove specific tracks from a saved playlist by path. Returns the number of references removed (0 if none of the paths were in the playlist). The playlist record stays even if it ends up empty.

<ParamField path="playlist" type="string" required>
  Playlist name.
</ParamField>

<ParamField path="track_paths" type="string[]" required>
  Absolute file paths to remove. Get these from list\_playlist\_tracks. Never invent paths.
</ParamField>

## `set_playlist_description`

Set a saved playlist's description without touching its track list.

<ParamField path="name" type="string" required>
  Playlist name.
</ParamField>

<ParamField path="description" type="string" required>
  Free-text description to set. Replaces any existing description; pass an empty string to clear it.
</ParamField>

## `update_playlist`

Replace a playlist's contents wholesale (or create it if it doesn't exist). Returns the new track count and `replaced` (True if a playlist by this name already existed).

<ParamField path="name" type="string" required>
  Playlist name (created if missing).
</ParamField>

<ParamField path="track_paths" type="string[]" required>
  Absolute file paths from the library.
</ParamField>

<ParamField path="description" type="any">
  Optional free-text description. Omit to leave any existing description untouched; pass a string to set it.
</ParamField>
