Skip to main content
Glama
crates-music-mcp

crates-music-mcp

by guohangbk

create_daily_playlist

Builds one daily playlist across logged-in music platforms from recommendations and favorites, skips recently used songs, and searches each platform for matching tracks.

Instructions

生成「今日歌单」:全平台候选池 -> 同一份歌单,多平台各建一份。

候选池 = 所有平台的「今日推荐」+「全部收藏」去重(推荐优先), 自动避开最近 avoid_days 天推过的歌;然后在每一个已登录的平台各建一份同名歌单, 每首歌在目标平台现场搜索,找不到就跳过(记在该平台的 failed 里)。

services: 平台列表,如 ["qq_music","netease","kugou"];留空 = 全部平台。 service: 单平台写法(等价于 services=[xxx])。 count: 要建多少首,随便填(默认 40,想要 100 首就传 100;池子不够时有多少给多少)。 include: 点名想听的歌,逗号/分号/换行分隔,写成「歌名 - 歌手」,例如 "晴天 - 周杰伦, 海阔天空 - Beyond"。点名的歌一定排在最前面。 avoid_days: 避开最近几天推过的歌(默认 7;给 0 = 完全不看去重池)。 playlist_name: 指定歌单名(推荐:先调 suggest_playlist_names 挑一个, 或你自己起 —— 名字是给用户看的,你起得比内置规则好)。 留空则自动 "-<主题>",总长 ≤20 字(主题 ≤11 字)。 prompt: 用户的原始请求。话里带心情/场景(「今天心情不好」)、歌手名或年代 (「邓紫棋2020年以前的歌」)就贴着它起名;什么都没说就随机抽素材 (天气/时段/主题池),不做任何"雨天一定叫雨天窗边"的硬绑定。 with_weather: 天气是否参与命名(默认 true;可选项,取不到不影响生成)。 天气默认按出口 IP 定位,在服务器上会是机房所在地;想让天气贴合本城, 让用户设环境变量 MUSIC_WEATHER_CITY=城市名。 返回 {"ok","playlist_name","theme","name_source","name_budget","recent_names", "avoid_days","count","weather","weather_hint","pool_size","pool_sources", "results":[{platform,...}]}。 name_source 说明名字怎么来的(explicit/mood/artist/year/artist+year/random)。 某个平台没登录会在 results 里标 skipped=not_logged_in,不影响其他平台。 若返回里 weather_hint 非空,把它转述给用户(提醒设置 MUSIC_WEATHER_CITY)。

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "create_daily_playlist"
  }
}

Input Schema

NameRequiredDescriptionDefault
dateNo
countNo
promptNo
includeNo
serviceNo
servicesNo
avoid_daysNo
with_weatherNo
playlist_nameNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations at all, the description carries the full burden and does a lot: pool composition and dedup priority, the avoid_days skip rule, live per-platform search with silent skips recorded in that platform's failed list, and not_logged_in platforms marked skipped without affecting the rest. What it omits is idempotency/permissions for a write operation — nothing says whether re-running produces a second playlist with the same name, or what login state is required beyond '已登录'.

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 behavior is front-loaded in the first two lines before the parameter block, and each parameter line earns its place with non-obvious detail. It runs long and leans on bold markers and parenthetical asides, and the service/services equivalence could be one clause instead of two.

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 9-parameter mutation tool with zero annotation coverage, this is nearly complete: failure modes, naming provenance, weather fallback and per-platform result shape are all covered. Output fields are enumerated despite an output schema existing, which is mildly redundant but does clarify name_source values and the weather_hint action; the unmentioned date parameter is the real remaining gap.

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 9 parameters, so the description has to compensate, and it explains 8 of them with real semantics — count's soft cap, include's '歌名 - 歌手' format and separators, avoid_days' default and 0 case, playlist_name's ≤20-char / ≤11-char-theme budget, with_weather's IP-location caveat and MUSIC_WEATHER_CITY override. Only the date parameter is never mentioned anywhere.

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 opening line states a specific verb and resource (生成「今日歌单」) and immediately pins down the distinctive behavior: one shared candidate pool, then a separately created playlist per logged-in platform. That scope is enough for an agent to separate it from the single-platform create_* siblings without opening their schemas, though none of those siblings is named explicitly.

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?

Guidance is explicit and actionable: recommend calling suggest_playlist_names first (or letting the agent invent a name), use services for a list vs service for one platform, leave blank for all platforms, pass 0 for avoid_days to bypass dedup entirely, and relay weather_hint to the user when non-empty. The include ordering guarantee (named songs always first) and the 'give what you have if the pool is short' fallback remove most ambiguity.

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