query_library
Search a personal music library by artist, genre, played status, release date, or duration and return matching tracks with exact counts and total durations.
Instructions
Search the user's music library and return matching tracks with their totals.
Call this before stating any fact about the library. Never estimate a count, a duration or a track name from your own knowledge, and never add numbers up yourself: use total_matching and total_duration_ms from the result, which are computed exactly. The tracks list is truncated to limit entries, so it may be shorter than total_matching.
To find a longest, shortest, highest or lowest track, pass order_by as one of longest, shortest, highest_energy, lowest_energy and read the first entry. Never rank, compare or pick a maximum out of the list yourself; the ordering is computed here.
Quote duration_display for a track and total_duration_display for a set of them. Never convert milliseconds to minutes yourself.
Energy is an estimate, not a measurement. Every track carries energy_provenance saying where its value came from, and any answer that mentions energy must say it is an estimate.
If a genre search finds nothing, known_genres lists the genre tags the library actually uses. If the user's word is another name for one of them, as rap is for hip hop, search again with that tag and say which tag you searched. Never substitute a genre that is merely related.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| genre | No | ||
| limit | No | ||
| artist | No | ||
| played | No | ||
| order_by | No | ||
| released_after | No | ||
| max_duration_ms | No | ||
| min_duration_ms | No | ||
| released_before | No |