Skip to main content
Glama
umsachde

commendation

by umsachde

commendation

Сервер MCP, который рекомендует новые песни — никогда не песню, уже имеющуюся в вашей библиотеке, то есть никогда не песню из «Понравившихся» или из любых ваших плейлистов, а не только из того, который вы использовали как основу.

Он создан, чтобы работать лучше, чем встроенное радио/автовоспроизведение стримингового сервиса, за счёт объединения нескольких независимых сигналов для поиска (радио, похожий контент, расширение каталога исполнителя) и ранжирования кандидатов по тому, сколько из них совпадают, вместо того чтобы доверять одному алгоритму «чёрного ящика».

Бэкенд: YouTube Music (v1). Commendation задуман как универсальный рекомендательный движок, не привязанный к одному сервису — v1 полностью построен на YouTube Music (через ytmusicapi). Поддержка Spotify запланирована как второй бэкенд; см. раздел «v3 — Multi-provider support» в PLAN.md с вопросами дизайна по этому поводу.

Инструменты

Инструмент

Описание

recommend_from_song(video_id=None, song=None, artist=None, limit=20)

Рекомендует новые песни, похожие на исходную. Передайте video_id напрямую или song (опционально с artist), чтобы исходная песня была найдена через поиск — например, для запроса «песни, похожие на Kryptonite от 3 Doors Down» не нужен отдельный поиск.

recommend_from_playlist(playlist_id, limit=20, seed_sample_size=5)

Рекомендует новые песни на основе целого плейлиста (выбирает из него образцы исходных треков).

songs_by_artist(artist, limit=10)

Возвращает реальные песни указанного исполнителя — прямой запрос к каталогу, а не рекомендация по сходству.

Все три инструмента гарантируют, что каждый результат отсутствует в «Понравившихся» и во всех ваших плейлистах, а не только в том, который вы использовали как основу (если такой был). recommend_from_song дополнительно никогда не возвращает саму исходную песню; recommend_from_playlist дополнительно никогда не возвращает ничего из исходного плейлиста, даже если этот плейлист по какой-то причине не отображается в вашей библиотеке.

songs_by_artist — это инструмент другого типа, чем два других: без скоринга, без сигналов радио/похожего контента — только реальный каталог этого исполнителя с тем же исключением по всей библиотеке. Это жёсткое требование, а не «лучшее из возможного»: если подходящих песен меньше, чем limit, возвращается столько, сколько найдено (found в ответе), а не дополняется список заменителями. Этот инструмент никогда ничего никуда не добавляет.

Не включено (v1): сравнение по BPM/темпу. YouTube Music не предоставляет данные о темпе, поэтому для этого нужен второй источник данных (например, сторонний BPM API) — это цель на будущее, а не часть текущей сборки. Полное обоснование дизайна см. в PLAN.md.

Related MCP server: youtube-music-mcp

Настройка

1. Установка зависимостей

python3 -m venv .venv
source .venv/bin/activate
pip install -e .

2. Аутентификация (YouTube Music)

Официального API YouTube Music нет, поэтому ytmusicapi аутентифицируется, переиспользуя заголовки из вашего браузерного сеанса, в котором вы вошли в систему.

  1. Откройте music.youtube.com в Firefox (рекомендуется — копирование «сырых» заголовков в нём надёжнее, чем в Chrome), будучи авторизованным.

  2. Откройте DevTools (Cmd+Option+I / F12) → вкладка Network → фильтр по browse.

  3. Зайдите в плейлист или перезагрузите страницу, чтобы вызвать POST-запрос browse.

  4. Нажмите на этот запрос → вкладка Headers → переключите Raw headers → выделите и скопируйте весь блок.

  5. Вставьте его в новый файл с именем raw_headers.txt в корне проекта и сохраните.

  6. Выполните:

    python scripts/setup_auth_from_file.py

    Это создаст headers_auth.json и удалит raw_headers.txt.

В качестве альтернативы python scripts/setup_auth.py делает то же самое через интерактивное приглашение в терминале вместо файла, если вы предпочитаете вставлять напрямую.

headers_auth.json эквивалентен вашему авторизованному сеансу — никогда не коммитьте его и не передавайте никому. Он уже добавлен в .gitignore.

Проверьте, что аутентификация работает, и бегло проверьте рекомендации, прежде чем двигаться дальше:

python scripts/test_recommend.py

Эти заголовки периодически истекают/ротируются. Если инструменты начнут выдавать ошибку аутентификации, повторите этот шаг.

3. Добавление в Claude Code

claude mcp add commendation -s user \
  -e COMMENDATION_AUTH_PATH="$(pwd)/headers_auth.json" \
  -- "$(pwd)/.venv/bin/python" "$(pwd)/server.py"

-s user делает его доступным в любой сессии Claude Code, а не только в этом каталоге. Используйте абсолютные пути для интерпретатора python, server.py и COMMENDATION_AUTH_PATH, поскольку сервер может быть запущен из любого рабочего каталога.

Для других MCP-клиентов (Claude Desktop и т. д.) укажите им ту же команду и переменную окружения, используя их соответствующий формат конфигурации.

Тестирование

Модульные тесты (tests/) покрывают чистую логику — нормализацию, скоринг, ранжирование, фильтрацию исключений, разрешение поиска исполнителя/песни, трансляцию ошибок и все три инструмента сквозным образом (счастливый путь, сбои сигналов, нехватка результатов, ошибки валидации) — на основе самодельного фейкового YTMusic-клиента. Сетевой доступ или headers_auth.json не требуются.

pip install -e ".[dev]"
pytest

Проверьте покрытие с помощью:

pytest --cov=server --cov-report=term-missing

server.py имеет 98% покрытия по строкам; две строки, которые остались непокрытыми, — это реальная конструкция YTMusic() в _client() и точка входа if __name__ == "__main__", ни одна из которых не может быть осмысленно протестирована без живого сеанса аутентификации или реального запуска сервера как процесса.

scripts/test_recommend.py — это отдельный, дополняющий смоук-тест, который обращается к вашему реальному аккаунту (см. шаг 2 настройки), чтобы проверить, что аутентификация и живые рекомендации действительно работают.

Как ранжируются рекомендации

Для каждой исходной песни кандидаты собираются из трёх независимых сигналов:

  1. Радио — собственное автовоспроизведение/радио YouTube Music для этой песни.

  2. Похожий контент — отдельный сигнал «похожего контента», алгоритмически отличный от радио.

  3. Расширение исполнителя — другие песни самого исходного исполнителя, а также популярные треки пары его похожих исполнителей.

Оценка кандидата — это количество различных комбинаций (исходная песня, сигнал), в которых он появился — чем больше независимых сигналов совпадают, тем выше его позиция. Каждый результат включает поле sources, показывающее, какие сигналы его выявили, так что рекомендации объяснимы, а не являются «чёрным ящиком».

«Понравившиеся» и все плейлисты в вашей библиотеке исключаются в последнюю очередь, всегда, как жёсткий фильтр — ни одна рекомендация не может быть песней, которая вам уже понравилась или которую вы уже где-либо сохранили.

Обработка ошибок

Вызовы инструментов преобразуют типичные сбои в понятные сообщения вместо сырых traceback:

  • Отсутствующая/истёкшая/повреждённая аутентификация → сообщение с просьбой повторно запустить scripts/setup_auth_from_file.py.

  • Ограничение частоты запросов (HTTP 429) → сообщение с просьбой подождать и повторить.

  • Ограниченный/закрытый контент → сообщается как недоступный, а не вызывает сбой.

  • Сетевые ошибки → сообщаются напрямую.

  • Если отдельный сигнал (радио, похожий контент или расширение исполнителя) не срабатывает для данной исходной песни, этот сигнал молча пропускается для этой песни, а не приводит к сбою всей рекомендации.

Лицензия

MIT — см. LICENSE.

Available Tools

10 tools
explain_recommendationA

Explain why a song was recommended, in mood terms.

Reports the song's mood vector, which layer produced it (Claude reading the lyrics, YouTube mood-playlist membership, or the artist's own average), the named moods it sits closest to, and the mood it was last served against.

NameRequiredDescriptionDefault
video_idYes

Output Schema

NameRequiredDescription

No output parameters

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations, the description carries the full behavioral burden, and it does disclose the internal mechanics: the mood vector, which of three source layers produced it, the nearest named moods, and the mood last served against. It stops short of stating error behavior (e.g., what happens if the song was never recommended) or confirming it is side-effect-free.

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?

Front-loaded with the core purpose in the first clause, followed by one sentence enumerating what is reported. No filler, no repetition of the tool name.

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

Completeness4/5

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

For a read-only explanatory tool with an output schema present, the description need not restate return formats and is complete enough to call correctly. The only real gap is the undocumented video_id, which is minor given the output schema carries the result contract.

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

Parameters2/5

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

Schema description coverage is 0% for the single required video_id, and the description never mentions it, so it adds no meaning beyond the bare property name. The parameter is fairly self-evident, which keeps this from being a 1, but the description does not compensate for the coverage gap.

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?

States a specific verb and resource ('Explain why a song was recommended') and scopes it to mood terms. This clearly separates it from the action-oriented siblings like recommend_from_song and recommend_from_playlist, which produce recommendations rather than explain them.

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

Usage Guidelines3/5

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

Usage is implied: call this after a recommendation exists to understand its basis. There is no explicit when-to-use, no statement of prerequisites (e.g., must the song have been recommended?), and no routing to alternatives among the ten siblings.

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

index_statusA

Report how much of the mood index exists, so gaps are visible not silent.

Covers the mood-playlist crawl, how much of the listener's library carries a mood label and from which layer, and whether Claude-based labelling is configured. Low coverage means recommendations are ranking mostly on signal agreement rather than on mood -- worth saying out loud.

NameRequiredDescriptionDefault

No parameters

Output Schema

NameRequiredDescription

No output parameters

TDQS

A4.1/5.0
Behavior4/5

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

No annotations are provided, so the description must carry the behavioral burden, and it does reasonably well by disclosing exactly what the report contains and how to interpret low coverage (ranking on signal agreement rather than mood). It never explicitly states the operation is read-only or side-effect-free, which leaves one gap.

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

Conciseness4/5

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

The core purpose is front-loaded in the first sentence and the rest adds diagnostic meaning. A few phrases ('gaps are visible not silent', 'worth saying out loud') are stylistic flourishes that could be trimmed, but the passage stays short.

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

Completeness4/5

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

Given an output schema exists and there are no parameters or annotations, the description supplies enough conceptual context to know what the report conveys and why it matters. It stops short of describing invocation conditions, but little else is needed for a no-arg diagnostic.

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

Parameters4/5

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

The tool takes zero parameters, so per the rubric the baseline is 4. There is no parameter syntax to document and the description introduces none.

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 states a specific verb and resource ('Report how much of the mood index exists') and enumerates the scope it covers (crawl coverage, labelled library layers, Claude-labelling config). This clearly separates it from all siblings, which are recommendation, retrieval, or mutation tools.

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

Usage Guidelines3/5

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

Usage is only implied: the tool exists to surface index gaps and the description notes the implication of low coverage for recommendations, which hints at when it's worth calling. But there is no explicit 'use this when...' instruction or contrast with alternatives like refresh_library.

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

read_my_moodA

Infer the listener's current mood from recent listening, with evidence.

Returns the inferred vector, a plain-language described, a confidence, and evidence -- the specific observations behind it (a song on repeat, one artist dominating, valence drifting across the session).

Lead with the evidence, not the verdict. "You've had these three on loop since yesterday -- want something that sits there with you, or something that lifts?" is the point of this tool; asserting "you are sad" is not. Mood inference is often wrong, so offer it as a read the user can correct.

NameRequiredDescriptionDefault

No parameters

Output Schema

NameRequiredDescription

No output parameters

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses the epistemic limits of the tool ('mood inference is often wrong'), instructs that the result be presented as correctable, and names the concrete signals used. It omits anything about latency, caching, or how much history is scanned, but the fallibility disclosure is unusually valuable context.

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

Conciseness4/5

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

Front-loaded with the core purpose, then the return shape, then the interaction rule. The quoted example earns its space by encoding tone, though the enumeration of return fields partially duplicates the output schema and could be trimmed.

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

Completeness4/5

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

For a zero-parameter tool with a rich output schema and no annotations, this covers purpose, output framing, and the key caveat about unreliable inference. The only real gap is not routing the agent to the mood-recommendation siblings when the user actually wants a suggestion.

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

Parameters4/5

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

The tool takes zero parameters, so the baseline is 4. There is nothing for the description to disambiguate, and it correctly avoids inventing input semantics.

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?

States a specific verb and resource — infer the listener's current mood from recent listening — and frames it as an evidence-backed read, which cleanly separates it from the recommendation siblings (recommend_for_mood, recommend_from_playlist_for_mood). An agent can tell what this returns without opening the output schema.

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

Usage Guidelines3/5

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

It gives clear interaction guidance (lead with evidence, offer the inference as a correctable read) but never says when to call this instead of, or before, recommend_for_mood. The when-to-use case is only implied by the conversational framing.

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

recommend_for_moodA

Recommend new songs that match how the listener actually feels right now.

Unlike recommend_from_song, the mood decides where candidates come from: seeds are drawn from the listener's OWN library nearest the target mood, then expanded through radio/related/artist signals and songs from YouTube's mood playlists. Results are still guaranteed absent from their library.

Describing the mood -- in priority order: vector The precise path, and the one to prefer. A dict with valence (-1..1, despairing->euphoric), energy (0..1, still->frantic), tension (0..1, resolved->anxious; this is what separates angry from excited) and depth (0..1, background ->lyric-forward). YOU should read the user's words and set these -- you understand "wistful but still wants to get things done" far better than any keyword list. feeling Their words verbatim, as a fallback when you'd rather not commit to numbers. Matched against a mood-word lexicon. context One of: Chill, Sleep, Focus, Commute, Feel good, Romance, Energize, Workout, Party, Gaming, Sad. If none are given, the mood is inferred from recent listening history.

arc shapes the sequence rather than returning a flat mood-matched set: mirror stay where they are and validate it (default) lift start where they are, rise gradually -- never jump straight to upbeat when someone is low, it reads as being told to cheer up settle descend to calm; an evening wind-down deepen go further in; sometimes you want to sit in it properly hold stay in a band with energy as a curve (workout: warmup/peak/cooldown)

genres optionally restricts the seeds to the listener's own genre playlists, e.g. ["Punjabi", "Hip-Hop & Rap"].

language / exclude_languages filter the RESULTS, e.g. language=["english"]. Strict by default: a candidate with no language label is dropped, because someone asking for English only wants a guarantee. The response says how many were dropped and why; pass allow_unlabelled_language=True to keep them.

bpm biases ranking toward a tempo (half- and double-time count as close). bpm_min/bpm_max bound it instead. Songs with no known BPM are KEPT and simply not scored on tempo -- Deezer has no tempo for much of the non-English catalogue, so dropping them would delete whole languages.

limit is a ceiling, not a guarantee. If fewer than limit songs genuinely fit the mood (rated, with a real fit -- not just an unrated placeholder score), the shortfall is NOT padded with weak filler to hit the number. Filler is capped at 25% of limit: asking for 100 with 7 genuine matches returns 32 (7 + 25), not 100. See match_quality in the result for the genuine/filler breakdown, and notes for the human-readable version.

If they also point at a specific playlist ("look at this playlist and recommend me songs for how I feel"), use recommend_from_playlist_for_mood instead -- it seeds from that playlist's own fitting tracks rather than from the whole library.

This is READ-ONLY. If they asked for a PLAYLIST rather than a list, this tool is step one of three: get the songs here, create the playlist from the returned videoIds with a playlist-management tool, then call refresh_library() so those tracks are excluded from later recommendations.

The result carries target (the mood aimed at), target_origin (where it came from), seeds (which of their songs it grew from), notes (caveats worth repeating to the user), match_quality (genuine vs. filler counts) and songs, each with its slot, mood fit and which signals surfaced it.

NameRequiredDescriptionDefault
arcNomirror
bpmNo
limitNo
genresNo
vectorNo
bpm_maxNo
bpm_minNo
contextNo
feelingNo
languageNo
exclude_languagesNo
allow_unlabelled_languageNo

Output Schema

NameRequiredDescription

No output parameters

TDQS

A4.9/5.0
Behavior5/5

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

No annotations are provided, so the description must carry the full behavioral burden and it does: declares READ-ONLY, guarantees results absent from library, discloses the strict language filter and the unlabelled-drop behavior, and explains the 25% filler cap with a concrete example (7 + 25 = 32). These are non-obvious traits an agent cannot infer elsewhere.

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

Conciseness4/5

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

Front-loaded with purpose and organized under clear parameter headers, so it scans well despite its length. It is verbose and occasionally repetitive (the filler logic is restated in both `limit` and the result description), but nearly every sentence carries operational detail that would otherwise be missing.

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?

With an output schema present the description need not explain return values, yet it still previews `target`, `seeds`, `match_quality`, and `notes` to tell the agent what to surface to the user. Combined with the alternative routing and the playlist hand-off, an agent has everything needed to call it 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?

Schema description coverage is 0% and the schema has no enums, so the description compensates fully: it defines vector's four numeric dimensions with ranges and semantics, enumerates all eleven `context` values, documents each `arc` mode, and explains bpm_min/max biasing, language filtering, allow_unlabelled_language, and limit's ceiling-not-guarantee semantics. All 12 params gain meaning beyond the bare 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?

States a specific verb+resource ('recommend new songs that match how the listener actually feels') and immediately contrasts its seed-selection mechanism against recommend_from_song. An agent can distinguish it from every sibling without opening the schema.

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

Usage Guidelines5/5

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

Explicitly names when to switch: 'If they also point at a specific playlist ... use recommend_from_playlist_for_mood instead.' It also clarifies the multi-step playlist workflow (get songs here, create playlist, call refresh_library) and that this tool is not for building playlists directly.

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

recommend_from_playlistA

Recommend new songs based on an entire playlist.

Randomly samples up to seed_sample_size tracks from the playlist as seeds (the whole playlist if it's smaller), runs the same multi-signal candidate generation as recommend_from_song for each, and pools/ranks the results. Never returns a song already in Liked Music, already in the source playlist, or already in ANY other of the user's playlists.

The library exclusion set is cached for speed; newly liked songs are always honoured, but call refresh_library() after adding songs to a playlist by other means.

NameRequiredDescriptionDefault
limitNo
playlist_idYes
seed_sample_sizeNo

Output Schema

NameRequiredDescription
resultYes

TDQS

A4.3/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so well: it discloses the sampling strategy (up to seed_sample_size random seeds), the pooling/ranking approach, and hard output guarantees (never returns songs in Liked Music, the source playlist, or any other playlist). It also flags a caching staleness risk and the refresh_library remedy, which is exactly the kind of behavioral caveat an agent needs before trusting results.

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

Conciseness4/5

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

Front-loads the one-line purpose, then layers mechanism, guarantees, and the caching caveat in short paragraphs; every sentence carries information. Slightly verbose in restating the multi-signal pipeline, but no filler sentences.

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

Completeness4/5

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

An output schema exists, so return-value explanation is unnecessary, and the description covers seeding, exclusions, and cache behavior. The main gap is the unexplained `limit` parameter and no mention of failure modes for an invalid playlist_id, but overall it is sufficient to invoke the tool correctly.

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

Parameters3/5

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

Schema description coverage is 0%, so the description must compensate for three undocumented parameters. It explains seed_sample_size concretely (random seed count, with whole-playlist fallback) and implies playlist_id's role, but never explains what `limit` (default 20) controls. Partial compensation only.

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?

Names a specific verb and resource ('Recommend new songs based on an entire playlist') and explicitly differentiates its mechanism from the sibling recommend_from_song ('runs the same multi-signal candidate generation as recommend_from_song for each, and pools/ranks'). An agent can distinguish it from recommend_from_song and recommend_from_playlist_for_mood without opening any schema.

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?

Gives clear context for when this tool applies (you have a whole playlist rather than one seed song) and an explicit follow-up call ('call refresh_library() after adding songs to a playlist by other means'), which routes the agent to a sibling when the cache is stale. It stops short of an explicit 'use recommend_from_song when you only have one track' exclusion, so it is strong but not fully enumerated.

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

recommend_from_playlist_for_moodA

Recommend new songs from ONE playlist, shaped by how the listener feels.

For "I feel like this -- look at this playlist and find me songs". Use this over recommend_from_playlist whenever a mood is part of the ask, and over recommend_for_mood whenever a specific playlist is.

Unlike recommend_from_playlist, which samples a few tracks at random and ignores mood entirely: EVERY track in the playlist is read and scored for mood fit, and only genuine matches -- tracks whose own mood resolves and actually fits the target -- are used as seeds. An off-mood playlist therefore yields few seeds or none, which is reported rather than papered over by seeding from tracks that don't fit.

Seeding costs ~4 API calls per seed, so the best-fitting seeds are capped (default 20, override with seed_cap). seed_report in the result says how many tracks were considered, how many were genuine, and how many were capped away.

Mood arguments behave exactly as in recommend_for_mood (vector preferred, then feeling, then context; falls back to inferred mood). arc shapes the sequence the same way. Results are guaranteed absent from Liked Music, from this playlist, and from every other playlist -- and limit is a ceiling, not a guarantee: filler is capped at 25% of it, same as recommend_for_mood.

This is READ-ONLY -- it never creates a playlist or adds anything anywhere. To turn the result into a real playlist, pass the returned videoIds to a playlist-management tool, then call refresh_library() so the new tracks are excluded from later recommendations.

NameRequiredDescriptionDefault
arcNomirror
bpmNo
limitNo
vectorNo
bpm_maxNo
bpm_minNo
contextNo
feelingNo
languageNo
seed_capNo
playlist_idYes
exclude_languagesNo
allow_unlabelled_languageNo

Output Schema

NameRequiredDescription

No output parameters

TDQS

A4.5/5.0
Behavior5/5

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

No annotations are provided, so the description carries the full behavioral burden and does so richly: read-only guarantee, ~4 API calls per seed with a default cap of 20, seed_report contents (considered/genuine/capped), the fact that off-mood playlists legitimately yield few or no seeds rather than being papered over, exclusion guarantees, and the 25% filler ceiling on `limit`. This is exactly the cost/side-effect/auth context an agent needs.

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

Conciseness4/5

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

Front-loaded with the one-line purpose and the routing rule before any internals, and every paragraph adds a distinct fact (contrast, cost/seed behavior, mood args, guarantees, read-only follow-up). It is long, and a couple of clauses ('same as recommend_for_mood') are mild repetition, but no paragraph is filler.

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

Completeness4/5

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

With an output schema present it correctly avoids re-describing return values while still flagging the meaningful `seed_report` field. For a 13-parameter, no-annotation, no-schema-description tool it covers behavior thoroughly, but the unaddressed bpm/language parameter family is a real completeness gap.

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

Parameters3/5

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

Schema description coverage is 0%, so the description must compensate and it only partially does. It clarifies vector>feeling>context precedence, arc's shaping role, seed_cap, and limit's ceiling semantics, but 13 parameters exist and bpm/bpm_min/bpm_max, language, exclude_languages, and allow_unlabelled_language are never addressed beyond their self-evident names.

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?

States a specific verb+resource+scope: 'Recommend new songs from ONE playlist, shaped by how the listener feels.' It explicitly contrasts itself with both closest siblings (recommend_from_playlist and recommend_for_mood) and names the distinguishing dimension (mood presence, playlist specificity).

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

Usage Guidelines5/5

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

Gives explicit routing rules: 'Use this over recommend_from_playlist whenever a mood is part of the ask, and over recommend_for_mood whenever a specific playlist is,' plus a concrete user-facing trigger ('I feel like this -- look at this playlist and find me songs'). It also explains the follow-up workflow (pass videoIds to a playlist tool, then call refresh_library()).

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

recommend_from_songA

Recommend new songs similar to a seed song.

Seed the search either with a known video_id, or with song (a free-text title, optionally narrowed with artist) to have the seed resolved via search internally -- e.g. "10 songs that relate to Kryptonite by 3 Doors Down" needs no separate lookup first. Exactly one of video_id or song must be given.

Combines YouTube Music's radio, its separate "related" signal, and the seed artist's own catalog plus related artists' catalogs, then ranks by how many independent signals agreed on each candidate. Never returns the seed song itself, and never returns a song already in Liked Music or in ANY of the user's playlists.

By default candidates can come from OTHER artists too (radio/related signals surface stylistically similar tracks, not just the seed artist's own catalog) -- pass same_artist_only=True to keep only songs credited to the seed's own artist(s), e.g. for "recommend songs BY artist X similar to song Y" requests.

language / exclude_languages filter the RESULTS independently of the seed, which is the point: seeding from a Punjabi song with language=["english"] returns English songs similar to it. Strict by default -- candidates with no language label are dropped, since a Punjabi-seeded pool is mostly Punjabi and keeping unlabelled ones would hand back exactly what was excluded. Pass allow_unlabelled_language=True to relax that; the response always reports what was dropped.

When a language filter leaves too few results -- seeding from a Punjabi song and asking for English usually does -- the surviving songs are used as fresh seeds to reach more of that language in the same neighbourhood, since filtering alone can only return what happened to be in the seed's own pool. Set expand_across_language=False to skip that and get the short list.

match_seed_tempo=True biases results toward the seed's own BPM (half- and double-time count as close). bpm sets a tempo target directly, and bpm_min/bpm_max bound it. Songs with no known BPM are kept and simply not scored on tempo.

Returns {"songs": [...], "notes": [...], "filters": {...}} -- notes carry anything the user should hear about, such as results dropped for having no language label.

The library exclusion set is cached for speed; newly liked songs are always honoured, but call refresh_library() after adding songs to a playlist by other means.

NameRequiredDescriptionDefault
bpmNo
songNo
limitNo
artistNo
bpm_maxNo
bpm_minNo
languageNo
video_idNo
max_per_artistNo
match_seed_tempoNo
same_artist_onlyNo
exclude_languagesNo
expand_across_languageNo
allow_unlabelled_languageNo

Output Schema

NameRequiredDescription

No output parameters

TDQS

A4.3/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so: it discloses the multi-signal ranking strategy, that the seed song is never returned, exclusion of Liked Music and all playlists, the default cross-artist behaviour, language-filter strictness with allow_unlabelled_language escape hatch, and the response shape with notes. It even flags a cache-staleness behaviour and the refresh_library() remedy — exactly the kind of non-obvious trait annotations would normally supply.

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

Conciseness4/5

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

Purpose and the required-argument rule are front-loaded, and essentially every sentence adds a distinct behavioural fact, so length is largely justified. A few conversational asides ('which is the point:') and repeated restatements of the language-filter rationale could be trimmed without losing information.

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?

An output schema exists so return values need not be re-explained, and the description nonetheless names the response keys and the role of `notes`. Combined with the mutual-exclusion rule, filter semantics, and the cache/refresh_library dependency, an agent has everything needed to call this 14-parameter tool correctly.

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

Parameters4/5

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

Schema description coverage is 0% across 14 parameters, so the description is the only source of meaning, and it explains the semantics of most of them: video_id vs song mutual exclusion, artist narrowing, language/exclude_languages independence from the seed, allow_unlabelled_language, expand_across_language, same_artist_only, and match_seed_tempo/bpm/bpm_min/bpm_max including the half/double-time and missing-BPM cases. It leaves `limit` and `max_per_artist` (the default of 2) undocumented.

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

Purpose4/5

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

The first sentence gives a specific verb and resource ('Recommend new songs similar to a seed song'), which cleanly separates it from the playlist- and mood-seeded siblings by seeding resource. It never names those siblings explicitly, so an agent must infer the routing from the resource noun rather than being told.

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?

Strong in-scope guidance: exactly one of video_id or song must be given, with a worked example ('10 songs that relate to Kryptonite by 3 Doors Down'); it also explains when same_artist_only, language filters, and expand_across_language apply. It does not, however, compare itself against the sibling tools (recommend_from_playlist, recommend_for_mood), so the agent gets no explicit alternative routing.

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

record_feedbackB

Record what the listener thought of a recommendation.

reaction is one of: loved, saved, skipped, wrong_mood.

wrong_mood is the valuable one -- it says the song was fine but the mood read was off, which is a different failure from simply not liking it. Anything marked skipped or wrong_mood is never recommended again.

NameRequiredDescriptionDefault
reactionYes
video_idYes

Output Schema

NameRequiredDescription

No output parameters

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It does disclose a meaningful system effect -- 'Anything marked skipped or wrong_mood is never recommended again' -- which is durable state change worth knowing. However, it omits idempotency, auth/permission needs, error behavior, and whether feedback can be changed after recording.

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

Conciseness4/5

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

Short and front-loaded: purpose first, then the allowed values, then the consequence. Every sentence carries weight, though the sentimental framing of 'the valuable one' is mildly editorial rather than operational.

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

Completeness3/5

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

An output schema exists, so return values need not be described, and the reaction semantics are covered well. The one gap is the undocumented required `video_id` and no statement of the recording's persistence or reversibility, which leaves the agent guessing on a required field.

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

Parameters3/5

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

Schema coverage is 0%, so the description must compensate. It fully enumerates and interprets the `reaction` values, which the schema does not (no enum). But `video_id` is never explained -- the agent must infer where a video id comes from -- leaving half the parameters undocumented.

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

Purpose4/5

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

The description states a specific verb+resource ('Record what the listener thought of a recommendation'), making it a feedback sink that is easily distinguished from the sibling recommender tools. It does not explicitly name siblings, but the purpose is unambiguous.

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

Usage Guidelines3/5

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

Use is implied by the recommender sibling set (call this after a recommendation is consumed), and it hints at the value of one reaction type. There is no explicit when-to-use, when-not, or routing to alternatives such as explain_recommendation.

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

refresh_libraryA

Rebuild the cached library exclusion set from scratch, right now.

Every recommendation tool excludes songs already in Liked Music or any of your playlists. That set is expensive to build (~20s), so it's cached and reused. Liking a song is picked up immediately regardless, but adding a song to some other playlist is only seen once the cache is rebuilt.

Call this after adding songs to a playlist by other means (e.g. a playlist-management tool) if you want the next recommendation to account for them without waiting out the cache TTL.

NameRequiredDescriptionDefault

No parameters

Output Schema

NameRequiredDescription

No output parameters

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so well: it discloses the ~20s build cost, that the result is cached and reused, and that the effect is only otherwise visible after a cache TTL. It also clarifies the incremental freshness rule (likes immediate, playlist adds deferred), which is non-obvious and directly affects whether the agent should call it.

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

Conciseness4/5

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

The action is front-loaded in the first sentence and each subsequent sentence adds real information (cost, cache semantics, call condition). The cache-economics paragraph is slightly more expansive than strictly needed, but it is not wasted.

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?

An output schema exists, so return values need not be described. For a zero-parameter maintenance tool, the description covers the why, the cost, the caching model, and the precise call condition, leaving no material gap for an agent deciding whether to invoke it.

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

Parameters4/5

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

There are zero parameters, so the baseline is 4 and there is no parameter syntax for the description to clarify. Nothing is missing, but there is also no opportunity to add semantic value here.

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?

Names a specific verb and resource ('Rebuild the cached library exclusion set') and immediately explains its relationship to the sibling recommendation tools, which all consume this set. An agent can distinguish this maintenance tool from recommend_* siblings without opening any schema.

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

Usage Guidelines5/5

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

States the exact trigger ('Call this after adding songs to a playlist by other means') and explicitly contrasts it with the case where it is unnecessary, since liking a song is already picked up immediately. It also names the alternative workflow (a playlist-management tool) that creates the need.

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

songs_by_artistA

Return actual songs by a specific artist -- a direct catalog pull, not a similarity recommendation like recommend_from_song/recommend_from_playlist.

Resolves artist (a name) to its YouTube Music channel and pulls its real song catalog, excluding anything already in Liked Music OR in ANY of the user's playlists (not just one, unlike recommend_from_playlist's single-seed-playlist exclusion). Read-only: never adds results anywhere.

This is a hard requirement, not best-effort -- if fewer than limit qualifying songs exist after exclusion, this returns however many were actually found rather than padding the list. Check found vs requested in the result to see whether it fell short.

Remix/feature variants of the same underlying song (e.g. a track and its "(feat. ...)" credit under a different videoId) count once, not once per variant -- see variants_collapsed in the result.

The library exclusion set is cached for speed; newly liked songs are always honoured, but call refresh_library() after adding songs to a playlist by other means.

NameRequiredDescriptionDefault
limitNo
artistYes

Output Schema

NameRequiredDescription

No output parameters

TDQS

A4.3/5.0
Behavior4/5

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

No annotations are provided, so the description carries the burden. It discloses read-only behavior ('never adds results anywhere'), the exclusion set semantics (Liked Music OR any playlist), the hard requirement that it returns fewer than limit rather than padding, and the variant-collapsing behavior. It does not state auth/permission requirements or rate limits, so not a 5.

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

Conciseness4/5

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

Multi-paragraph but front-loads the core purpose and sibling differentiation first, then layers in exclusion behavior, shortfall semantics, variant collapsing, and caching. Each paragraph earns its place, though some detail could be trimmed.

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

Completeness4/5

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

The tool has an output schema, so return-value explanation is largely unnecessary, yet the description references result fields ('found' vs 'requested', 'variants_collapsed') to clarify semantics. Covers exclusion behavior, caching caveat, and refresh_library guidance. Could still note artist-resolution failure behavior, but is largely complete.

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

Parameters3/5

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

Schema description coverage is 0%, so the description must compensate. It explains 'artist' is a name resolved to a YouTube Music channel and mentions 'limit' as a qualifying-songs count, adding real meaning. But it does not specify limit bounds, defaults effect, or exact artist-matching semantics, leaving gaps for a 0%-coverage 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?

States a specific verb+resource ('Return actual songs by a specific artist -- a direct catalog pull') and explicitly distinguishes itself from siblings by contrasting with similarity recommendations like recommend_from_song/recommend_from_playlist. The direct-catalog-pull framing makes it unmistakable.

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

Usage Guidelines5/5

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

Explicitly contrasts this tool with recommend_from_song and recommend_from_playlist, and clarifies the exclusion scope differs from recommend_from_playlist's single-seed-playlist exclusion. It also instructs when to call refresh_library(). Strong when-to-use guidance.

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

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 10 tool updatesv0.2.0
    • First observedexplain_recommendation
    • First observedindex_status
    • First observedread_my_mood
    • First observedrecommend_for_mood
    • First observedrecommend_from_playlist
    • First observedrecommend_from_playlist_for_mood
    • First observedrecommend_from_song
    • First observedrecord_feedback
    • First observedrefresh_library
    • First observedsongs_by_artist

TDQS

A4.2/5.0

Scored across 10 tools

Disambiguation4/5

Tool names and descriptions clearly delineate purposes: recommend_from_song seeds by a song, recommend_from_playlist seeds by playlist, recommend_for_mood uses mood, recommend_from_playlist_for_mood combines both. songs_by_artist and explain_recommendation are distinct. Minor potential confusion between recommend_from_playlist_for_mood and recommend_for_mood, but descriptions explicitly guide selection.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern (recommend_from_song, read_my_mood, record_feedback, etc.) with snake_case throughout, no deviations.

Tool Count5/5

10 tools provide a well-scoped set covering recommendation generation, library management, feedback, mood reading, explanation, and status—each earns its place without excess.

Completeness5/5

Comprehensive lifecycle coverage: multiple recommendation entry points (by song, playlist, mood, playlist+mood), library refresh, mood inference, feedback recording, explanation, and index status. No obvious gaps for a music recommendation system.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    An MCP server for managing YouTube Music playlists via Claude. Add and remove songs, create playlists, and ask Claude to suggest music — all through conversation.
    -
  • F
    license
    Not graded
    quality
    D
    maintenance
    A production-grade MCP server that connects YouTube Music to AI assistants, enabling music search, library management, playlist creation, and personalized recommendations through 15 tools, 3 resources, and 3 prompts.
    1
    -
  • A
    license
    Not graded
    quality
    D
    maintenance
    An MCP server that enables AI applications to search YouTube music videos and manage playlists via the YouTube Data API v3, with OAuth support for playlist and subscription management.
    3
    MIT