Skip to content

Playlist Tools

Seven tools provide the core playlist query and management operations.

Queries

fb2k_playlist_get_all

Gets all playlists.

  • Parameters: none
  • Bridge method: playlist.getAll

Example result:

json
[
  {
    "index": 0,
    "name": "Default",
    "trackCount": 128,
    "isActive": true,
    "isPlaying": true,
    "isLocked": false,
    "isAutoplaylist": false
  },
  {
    "index": 1,
    "name": "Favorites",
    "trackCount": 42,
    "isActive": false,
    "isPlaying": false,
    "isLocked": false,
    "isAutoplaylist": true
  }
]
FieldTypeDescription
indexintegerPlaylist index
namestringPlaylist name
trackCountintegerTrack count
isActivebooleanWhether this is the active playlist
isPlayingbooleanWhether this is the playing playlist
isLockedbooleanWhether the playlist is locked
isAutoplaylistbooleanWhether the playlist is an autoplaylist

fb2k_playlist_get_active

Gets the active playlist.

  • Parameters: none
  • Bridge method: playlist.getActive

Example result:

json
{
  "index": 0,
  "name": "Default",
  "trackCount": 128,
  "isActive": true,
  "isPlaying": true,
  "isLocked": false,
  "duration": 34567.8
}
FieldTypeDescription
indexintegerPlaylist index
namestringPlaylist name
trackCountintegerTrack count
isActivebooleanWhether this is the active playlist
isPlayingbooleanWhether this is the playing playlist
isLockedbooleanWhether the playlist is locked
durationnumberTotal duration in seconds

Management

fb2k_playlist_set_active

Sets the active playlist.

  • Bridge method: playlist.setActive
ParameterTypeRequiredConstraints
playlistintegerYesZero-based playlist index; minimum 0

fb2k_playlist_create

Creates an empty playlist.

  • Bridge method: playlist.create
ParameterTypeRequiredDescription
namestringYesPlaylist name

fb2k_playlist_remove

Removes a playlist.

  • Bridge method: playlist.remove
ParameterTypeRequiredConstraints
playlistintegerYesZero-based playlist index; minimum 0

Track operations

fb2k_playlist_get_tracks

Gets a page of tracks from a playlist.

  • Bridge method: playlist.getTracks
ParameterTypeRequiredConstraints
playlistintegerNoDeclared minimum 0; defaults to the active playlist
startintegerNoDeclared minimum 0; Bridge default 0
countintegerNoDeclared range 1 to 500; Bridge default 100

The ToolDefinition description currently says default 50, but it declares no MCP default. Omission therefore reaches playlist.getTracks, whose handler uses 100; that runtime behavior is documented here.

Example result:

json
{
  "playlist": 0,
  "start": 0,
  "count": 2,
  "total": 128,
  "tracks": [
    {
      "index": 0,
      "title": "Redo",
      "artist": "164 feat. GUMI",
      "album": "Millennium Mother",
      "albumArtist": "164",
      "genre": "Vocaloid",
      "date": "2011",
      "trackNumber": 1,
      "discNumber": 1,
      "duration": 263.5,
      "path": "D:\\\\Music\\\\Mili\\\\Redo.flac",
      "absolutePath": "D:\\\\Music\\\\Mili\\\\Redo.flac",
      "fileSize": 28456789,
      "subsong": 0,
      "rating": 5,
      "codec": "FLAC",
      "bitrate": 876,
      "sampleRate": 44100,
      "channels": 2,
      "composer": "164",
      "comment": "",
      "playCount": "12",
      "firstPlayed": "2024-01-15",
      "lastPlayed": "2025-06-01",
      "added": "2024-01-10"
    }
  ]
}

Pagination

Use start and count to page through large playlists. The total field reports the playlist's total track count.

fb2k_playlist_play_track

Plays a specific track in a playlist.

  • Bridge method: playlist.playTrack
ParameterTypeRequiredConstraints
indexintegerYesZero-based track index; minimum 0
playlistintegerNoMinimum 0; defaults to the active playlist
deferredbooleanNoWhether playback should be deferred