Skip to content

Playlist Extended Tools

Forty tools cover playlist inspection, ordering, track insertion and removal, selection, focus, undo/redo, locking, and autoplaylists.

Parameter notation

  • A parameter without ? is required by the MCP input schema.
  • playlist?: integer >= 0 defaults to the active playlist in the mapped Bridge handler.
  • Array element types are shown in brackets, such as paths: string[].
  • The newOrder, items, and indices integer-array item schemas declare a minimum of 0 wherever those fields appear below.
  • Defaults shown below are applied by MCP registration before the Bridge call.

Queries and playlist management

ToolBridge methodParametersDescription
fb2k_playlist_get_countplaylist.getCountnoneGet the number of playlists
fb2k_playlist_get_playingplaylist.getPlayingnoneGet the playing playlist
fb2k_playlist_get_track_countplaylist.getTrackCountplaylist?: integer >= 0Get a playlist's track count
fb2k_playlist_get_available_columnsplaylist.getAvailableColumnsnoneGet available playlist-column definitions
fb2k_playlist_renameplaylist.renameplaylist: integer >= 0, name: stringRename a playlist
fb2k_playlist_clearplaylist.clearplaylist?: integer >= 0Clear a playlist
fb2k_playlist_duplicateplaylist.duplicateplaylist?: integer >= 0, name?: stringDuplicate a playlist; the Bridge derives a name when omitted
fb2k_playlist_reorder_playlistsplaylist.reorderPlaylistsnewOrder: integer[] with items >= 0Reorder all playlists

Track ordering and removal

ToolBridge methodParametersDescription
fb2k_playlist_insert_tracksplaylist.insertTrackshandles: string[], playlist?: integer >= 0, position?: integer >= 0Insert track handles
fb2k_playlist_remove_tracksplaylist.removeTracksitems: integer[], playlist?: integer >= 0Remove tracks by index
fb2k_playlist_remove_selected_tracksplaylist.removeSelectedTracksplaylist?: integer >= 0Remove selected tracks
fb2k_playlist_move_tracksplaylist.moveTracksdelta: integer, playlist?: integer >= 0, items?: integer[]Move tracks by a signed offset
fb2k_playlist_reorderplaylist.reordernewOrder: integer[], playlist?: integer >= 0Apply a custom track order
fb2k_playlist_reverseplaylist.reverseplaylist?: integer >= 0Reverse track order
fb2k_playlist_sortplaylist.sortplaylist?: integer >= 0, pattern?: string = "%title%", descending?: boolean = false, selectedOnly?: boolean = falseSort with a foobar2000 title-format pattern
fb2k_playlist_shuffleplaylist.shuffleplaylist?: integer >= 0Shuffle track order

Title-format examples include %title%, %album artist% - %album% - %tracknumber%, and %rating%.

Adding and replacing tracks

ToolBridge methodParametersDescription
fb2k_playlist_add_pathsplaylist.addPathspaths: string[], playlist?: integer >= 0Add file paths
fb2k_playlist_add_handlesplaylist.addHandleshandles: string[], playlist?: integer >= 0Add track handles without CUE expansion
fb2k_playlist_add_paths_sequentialplaylist.addPathsSequentialpaths: string[], playlist?: integer >= 0Add paths sequentially
fb2k_playlist_add_paths_asyncplaylist.addPathsAsyncpaths: string[], playlist?: integer >= 0Add paths asynchronously
fb2k_playlist_replace_all_and_playplaylist.replaceAllAndPlaypaths: string[], playlist?: integer >= 0, playIndex?: integer >= 0 = 0, stopFirst?: boolean = true, autoPlay?: boolean = trueAtomically replace playlist contents and optionally play

Selection and focus

ToolBridge methodParametersDescription
fb2k_playlist_get_selected_tracksplaylist.getSelectedTracksplaylist?: integer >= 0Get selected track details
fb2k_playlist_get_selectionplaylist.getSelectionplaylist?: integer >= 0Get selected track indices
fb2k_playlist_set_selectionplaylist.setSelectionindices: integer[], playlist?: integer >= 0, clearOthers?: boolean = trueSet selected indices
fb2k_playlist_select_allplaylist.selectAllplaylist?: integer >= 0Select every track
fb2k_playlist_deselect_allplaylist.deselectAllplaylist?: integer >= 0Clear the selection
fb2k_playlist_get_focused_trackplaylist.getFocusedTrackplaylist?: integer >= 0Get the focused track index
fb2k_playlist_set_focused_trackplaylist.setFocusedTrackindex: integer >= 0, playlist?: integer >= 0Set the focused track
fb2k_playlist_focus_trackplaylist.focusTrackplaylist?: integer >= 0, index?: integer >= 0Deprecated compatibility tool; use fb2k_playlist_set_focused_track
fb2k_playlist_get_focus_trackplaylist.getFocusTrackplaylist?: integer >= 0Deprecated compatibility tool; use fb2k_playlist_get_focused_track

Undo, redo, and locking

ToolBridge methodParametersDescription
fb2k_playlist_undoplaylist.undoplaylist?: integer >= 0Undo the last playlist operation
fb2k_playlist_redoplaylist.redoplaylist?: integer >= 0Redo the last undone operation
fb2k_playlist_get_lock_infoplaylist.getLockInfoplaylist?: integer >= 0Get playlist lock information
fb2k_playlist_is_lockedplaylist.isLockedplaylist?: integer >= 0Check whether a playlist is locked

Autoplaylists

ToolBridge methodParametersDescription
fb2k_playlist_is_autoplaylistplaylist.isAutoplaylistplaylist?: integer >= 0Check whether a playlist is an autoplaylist
fb2k_playlist_create_autoplaylistplaylist.createAutoplaylistquery: string, name?: string = "New Autoplaylist", sort?: string, keepSorted?: boolean = falseCreate an autoplaylist from a foobar2000 query
fb2k_playlist_convert_to_autoplaylistplaylist.convertToAutoplaylistquery: string, playlist?: integer >= 0, sort?: string, keepSorted?: boolean = falseConvert a playlist to an autoplaylist
fb2k_playlist_remove_autoplaylistplaylist.removeAutoplaylistplaylist?: integer >= 0Remove autoplaylist behavior while preserving tracks
fb2k_playlist_get_autoplaylist_infoplaylist.getAutoplaylistInfoplaylist?: integer >= 0Get autoplaylist details
fb2k_playlist_get_autoplaylist_queryplaylist.getAutoplaylistQueryplaylist?: integer >= 0Get the autoplaylist query

Query syntax

Autoplaylist queries use the same foobar2000 query language as library.search, for example artist IS Mili.