Skip to content

Library Tools

Four tools search and summarize the media library.

Searches the media library with foobar2000 query syntax, for example artist IS Mili or %rating% GREATER 3.

  • Bridge method: library.search
ParameterTypeRequiredConstraints
querystringYesfoobar2000 query expression
offsetintegerNoDeclared minimum 0; the Bridge default is 0
limitintegerNoDeclared range 1 to 500; the Bridge default is 100

The MCP declaration describes the runtime default but does not inject a default value. When limit is omitted, the request reaches library.search, whose handler uses 100.

Example result:

json
{
  "tracks": [
    { "title": "Redo", "artist": "Mili", "album": "Millennium Mother", "path": "..." }
  ],
  "total": 42
}

Query examples

  • artist IS Mili — exact match
  • title HAS love — substring match
  • %rating% GREATER 3 — numeric comparison
  • artist IS Mili AND album IS "Miracle Milk" — combined expression

fb2k_library_get_albums

Gets all album names in the media library.

  • Parameters: none
  • Bridge method: library.getAlbums

fb2k_library_get_artists

Gets all artist names in the media library.

  • Parameters: none
  • Bridge method: library.getArtists

fb2k_library_get_stats

Gets media-library statistics.

  • Parameters: none
  • Bridge method: library.getStats

Example result:

json
{
  "totalTracks": 12345,
  "totalAlbums": 678,
  "totalArtists": 234,
  "totalDuration": 3456789
}