Skip to main content
Glama

FreqBlog Music Metadata

Get Recommendations

get_recommendations
Read-only

Recommended tracks for one or more seed tracks — the drop-in for Spotify's removed GET /v1/recommendations. Blends up to 5 catalog seed tracks into a single point in audio-feature space and returns the nearest catalogue tracks, RE-RANKED by genre affinity (so a feature-close cross-genre track doesn't outrank same-genre picks).

Returns `seeds` (each {id, found}), `count`, and `tracks` (each {track, score,
genre_relation}; each track carries its `genre`). `genre_relation` is "same", "compatible"
(different but mixable family), "cross" (unrelated), or "unknown" (either side has no mapped
genre), measured against the PRIMARY seed — the first of your seed_tracks we could actually
use, so reordering seed_tracks changes it and a skipped seed never becomes the reference.
With a SINGLE seed the field is the ranking's own verdict, so it explains the order (same as
suggest_next_track). With SEVERAL seeds the ranking considers ALL of them while the label stays
relative to your primary seed, so a "cross" label on a multi-seed call does NOT mean the track
was pushed down — it may share a family with another of your seeds. `score` is the raw
audio-feature cosine similarity in [0,1]; genre affinity influences the ORDER, not the score,
so the list is NOT strictly score-descending.
Use cross_genre=strict to return same-genre-family tracks ONLY (off-genre dropped
server-side), or allow to disable the genre ranking. seed_tracks are catalog itunes_track_ids
from search_catalog or the itunes_track_id field of a get_audio_features result.

NO id? Pass `track` (+ optional `artist`) instead and we resolve the name to the best catalog
match and seed on it — the resolved track is echoed back as `seed_query`; seed_tracks wins if
both are given.

TUNING: `min`/`max` are HARD filters and `target` is a preference (nearer ranks higher,
nothing removed), over acousticness, danceability, duration_ms, energy, instrumentalness,
liveness, loudness, popularity, speechiness, tempo and valence. e.g. min={"tempo": 100},
max={"tempo": 130}, target={"energy": 0.8} for energetic 100-130 BPM tracks. When you tune,
the response adds a `filters` block saying what applied, how many tracks each bound removed
(`dropped_by`) and whether the bounds ran out of catalogue before `limit` (`limit_reached`)
— if the list comes back short, read that BEFORE assuming the catalogue is thin.
Costs 2 quota units.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
maxNoHARD upper bounds, e.g. {'tempo': 130}. Same attributes as `min`. Combine the two for a range.
minNoHARD lower bounds, e.g. {'tempo': 100, 'energy': 0.5}. Tracks below the bound — and tracks we hold no analysed value for — are dropped. Attributes: acousticness, danceability, duration_ms, energy, instrumentalness, liveness, loudness, popularity, speechiness, tempo, valence.
limitNoNumber of recommendations to return (default 20).
trackNoSeed by track NAME instead of an id — resolved to the best catalog match (echoed back as seed_query). Pair with artist to disambiguate. Ignored when seed_tracks is given.
artistNoArtist name narrowing the track seed (case-insensitive).
targetNoPREFERRED values, e.g. {'energy': 0.8}. Tracks nearer the value rank higher; unlike min/max nothing is removed. Same attributes as `min`.
cross_genreNoGenre handling (mirrors suggest_next_track): 'auto' (default) re-ranks by genre affinity so a feature-close cross-genre track can't outrank same-genre picks; 'strict' = same genre-family only (off-genre dropped server-side); 'allow' = genre-blind (pure audio-feature cosine).auto
seed_tracksNo1-5 catalog itunes_track_ids to base recommendations on, e.g. ['apple_ad1829eeccb70f9a'] (blended into a feature-space centroid). Omit and use track(+artist) to seed by name instead.
exclude_seed_artistsNoDrop tracks by any of the seed artists (default false).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

TDQS

A4.8/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Beyond annotations (readOnlyHint, openWorldHint), the description discloses extensive behavioral traits: 'RE-RANKED by genre affinity (so a feature-close cross-genre track doesn't outrank same-genre picks)', 'score is the raw audio-feature cosine similarity... genre affinity influences the ORDER, not the score', 'the list is NOT strictly score-descending', the meaning of 'genre_relation' values, the primary-seed logic, the tuning filter behavior ('min/max are HARD filters and target is a preference'), the added 'filters' block, and the quota cost. This goes far beyond what annotations convey.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is dense but well-structured, with the opening sentence delivering purpose, followed by output format, genre_relation semantics, tuning mechanics, fallback behavior, and costs—each paragraph serving a distinct role. No sentence is redundant; the example is concrete and illustrative. Length is justified by the tool's complexity and the need to explain nuanced behavior.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the 9-parameter schema, output schema, and complexity, the description covers all necessary aspects: input methods (ids vs names), output shape ('Returns seeds... count... tracks'), edge cases (multi-seed label meaning), filtering vs re-ranking, and even problem diagnosis ('if the list comes back short, read that BEFORE assuming the catalogue is thin'). It is complete for an AI agent to select and invoke correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

While the schema covers 100% of parameters descriptively, the tool description significantly enriches each one. It explains that seed_tracks are 'catalog itunes_track_ids from search_catalog or the itunes_track_id field of a get_audio_features result', that 'track' resolves to a best catalog match echoed as 'seed_query', and that min/target combine into an example ('min={"tempo": 100}, max={"tempo": 130}, target={"energy": 0.8}'). It also clarifies interactions like 'seed_tracks wins if both are given' and the cross_genre values, adding substantial meaning beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with 'Recommended tracks for one or more seed tracks — the drop-in for Spotify's removed GET /v1/recommendations', clearly stating the verb, resource, and scope. It further differentiates itself from sibling suggest_next_track by describing the genre-affinity re-ranking behavior, making its unique purpose unmistakable.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives clear context for when to use this tool: 'Use cross_genre=strict to return same-genre-family tracks ONLY', 'allow to disable the genre ranking', and 'NO id? Pass track (+ optional artist) instead' for name-based seeding. It also references suggest_next_track to contrast the genre_relation semantics, but it stops short of explicitly stating 'use this instead of suggest_next_track when...', so it lacks direct exclusion criteria.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

TDQS

A4.6/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose: search, feature retrieval, set building, transition scoring, etc. There is no overlap or ambiguity.

Naming Consistency5/5

All tools use consistent snake_case verb_noun pattern (e.g., find_tracks_by_key, get_audio_features, build_setlist). No style mixing.

Tool Count5/5

12 tools is well within the ideal range, covering search, features, discovery, and set building without bloat or deficiency.

Completeness4/5

Core metadata retrieval, search, harmonic mixing, and DJ set tools are all present. Minor gaps like user library management are outside the scope.

Resources