spotify
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSpotify
Spotify
Control the user's Spotify account via the Hermes Spotify toolset (7 tools). Setup guide: https://hermes-agent.nousresearch.com/docs/user-guide/features/spotify
通过Hermes Spotify工具集(共7个工具)控制用户的Spotify账户。设置指南:https://hermes-agent.nousresearch.com/docs/user-guide/features/spotify
When to use this skill
何时使用该技能
The user says something like "play X", "pause", "skip", "queue up X", "what's playing", "search for X", "add to my X playlist", "make a playlist", "save this to my library", etc.
当用户说出类似“播放X”、“暂停”、“跳过”、“将X加入队列”、“正在播放什么”、“搜索X”、“添加到我的X播放列表”、“创建播放列表”、“将此保存到我的音乐库”等内容时。
The 7 tools
7个工具
- — play, pause, next, previous, seek, set_repeat, set_shuffle, set_volume, get_state, get_currently_playing, recently_played
spotify_playback - — list, transfer
spotify_devices - — get, add
spotify_queue - — search the catalog
spotify_search - — list, get, create, add_items, remove_items, update_details
spotify_playlists - — get, tracks
spotify_albums - — list/save/remove with
spotify_librarykind: "tracks"|"albums"
Playback-mutating actions require Spotify Premium; search/library/playlist ops work on Free.
- — 播放、暂停、下一曲、上一曲、跳转、设置重复、设置随机播放、设置音量、获取状态、获取当前播放内容、最近播放记录
spotify_playback - — 列出设备、转移播放
spotify_devices - — 获取队列、添加到队列
spotify_queue - — 搜索音乐目录
spotify_search - — 列出播放列表、获取播放列表、创建播放列表、添加内容、移除内容、更新详情
spotify_playlists - — 获取专辑信息、获取专辑曲目
spotify_albums - — 按
spotify_library进行列出/保存/移除操作kind: "tracks"|"albums"
修改播放状态的操作需要Spotify Premium会员;搜索、音乐库、播放列表相关操作在免费版中即可使用。
Canonical patterns (minimize tool calls)
标准使用模式(减少工具调用次数)
"Play <artist/track/album>"
“播放<艺术家/曲目/专辑>”
One search, then play by URI. Do NOT loop through search results describing them unless the user asked for options.
spotify_search({"query": "miles davis kind of blue", "types": ["album"], "limit": 1})
→ got album URI spotify:album:1weenld61qoidwYuZ1GESA
spotify_playback({"action": "play", "context_uri": "spotify:album:1weenld61qoidwYuZ1GESA"})For "play some <artist>" (no specific song), prefer and play the artist context URI — Spotify handles smart shuffle. If the user says "the song" or "that track", search and pass to play.
types: ["artist"]types: ["track"]uris: [track_uri]先搜索,然后通过URI播放。除非用户要求提供选项,否则不要遍历搜索结果进行描述。
spotify_search({"query": "miles davis kind of blue", "types": ["album"], "limit": 1})
→ got album URI spotify:album:1weenld61qoidwYuZ1GESA
spotify_playback({"action": "play", "context_uri": "spotify:album:1weenld61qoidwYuZ1GESA"})对于“播放<艺术家>的作品”(无特定曲目),优先使用并播放艺术家的上下文URI——Spotify会处理智能随机播放。如果用户说“这首歌”或“那首曲目”,则搜索并传入进行播放。
types: ["artist"]types: ["track"]uris: [track_uri]"What's playing?" / "What am I listening to?"
“正在播放什么?” / “我在听什么?”
Single call — don't chain get_state after get_currently_playing.
spotify_playback({"action": "get_currently_playing"})If it returns 204/empty (), tell the user nothing is playing. Don't retry.
is_playing: false单次调用即可——不要在get_currently_playing之后链式调用get_state。
spotify_playback({"action": "get_currently_playing"})如果返回204/空值(),告知用户当前没有播放内容。不要重试。
is_playing: false"Pause" / "Skip" / "Volume 50"
“暂停” / “跳过” / “音量调到50”
Direct action, no preflight inspection needed.
spotify_playback({"action": "pause"})
spotify_playback({"action": "next"})
spotify_playback({"action": "set_volume", "volume_percent": 50})直接执行操作,无需预检。
spotify_playback({"action": "pause"})
spotify_playback({"action": "next"})
spotify_playback({"action": "set_volume", "volume_percent": 50})"Add to my <playlist name> playlist"
“添加到我的<播放列表名称>播放列表”
- to find the playlist ID by name
spotify_playlists list - Get the track URI (from currently playing, or search)
- with the playlist_id and URIs
spotify_playlists add_items
spotify_playlists({"action": "list"})
→ found "Late Night Jazz" = 37i9dQZF1DX4wta20PHgwo
spotify_playback({"action": "get_currently_playing"})
→ current track uri = spotify:track:0DiWol3AO6WpXZgp0goxAV
spotify_playlists({"action": "add_items",
"playlist_id": "37i9dQZF1DX4wta20PHgwo",
"uris": ["spotify:track:0DiWol3AO6WpXZgp0goxAV"]})- 调用通过名称查找播放列表ID
spotify_playlists list - 获取曲目URI(从当前播放内容或搜索结果中)
- 使用播放列表ID和URIs调用
spotify_playlists add_items
spotify_playlists({"action": "list"})
→ found "Late Night Jazz" = 37i9dQZF1DX4wta20PHgwo
spotify_playback({"action": "get_currently_playing"})
→ current track uri = spotify:track:0DiWol3AO6WpXZgp0goxAV
spotify_playlists({"action": "add_items",
"playlist_id": "37i9dQZF1DX4wta20PHgwo",
"uris": ["spotify:track:0DiWol3AO6WpXZgp0goxAV"]})"Create a playlist called X and add the last 3 songs I played"
“创建名为X的播放列表并添加我最近播放的3首歌”
spotify_playback({"action": "recently_played", "limit": 3})
spotify_playlists({"action": "create", "name": "Focus 2026"})
→ got playlist_id back in response
spotify_playlists({"action": "add_items", "playlist_id": <id>, "uris": [<3 uris>]})spotify_playback({"action": "recently_played", "limit": 3})
spotify_playlists({"action": "create", "name": "Focus 2026"})
→ got playlist_id back in response
spotify_playlists({"action": "add_items", "playlist_id": <id>, "uris": [<3 uris>]})"Save / unsave / is this saved?"
“保存/取消保存/是否已保存?”
Use with the right .
spotify_librarykindspotify_library({"kind": "tracks", "action": "save", "uris": ["spotify:track:..."]})
spotify_library({"kind": "albums", "action": "list", "limit": 50})使用带有正确参数的工具。
kindspotify_libraryspotify_library({"kind": "tracks", "action": "save", "uris": ["spotify:track:..."]})
spotify_library({"kind": "albums", "action": "list", "limit": 50})"Transfer playback to my <device>"
“将播放转移到我的<设备>”
spotify_devices({"action": "list"})
→ pick the device_id by matching name/type
spotify_devices({"action": "transfer", "device_id": "<id>", "play": true})spotify_devices({"action": "list"})
→ pick the device_id by matching name/type
spotify_devices({"action": "transfer", "device_id": "<id>", "play": true})Critical failure modes
关键失败场景
403 Forbidden — No active device foundspotify_devices list403 Forbidden — Premium required204 No Contentget_currently_playingis_playing: false429 Too Many Requests401 Unauthorizedhermes auth spotify403 Forbidden — No active device foundspotify_devices list403 Forbidden — Premium requiredget_currently_playing204 No Contentis_playing: false429 Too Many Requests重试后返回:表示刷新令牌已被撤销。告知用户重新运行。
401 Unauthorizedhermes auth spotifyURI and ID formats
URI和ID格式
Spotify uses three interchangeable ID formats. The tools accept all three and normalize:
- URI: (preferred)
spotify:track:0DiWol3AO6WpXZgp0goxAV - URL:
https://open.spotify.com/track/0DiWol3AO6WpXZgp0goxAV - Bare ID:
0DiWol3AO6WpXZgp0goxAV
When in doubt, use full URIs. Search results return URIs in the field — pass those directly.
uriEntity types: , , , , , . Use the right type for the action — with a expects album/playlist/artist; expects an array of track URIs.
trackalbumartistplaylistshowepisodespotify_playback.playcontext_uriurisSpotify使用三种可互换的ID格式。工具支持所有三种格式并会进行标准化:
- URI: (推荐使用)
spotify:track:0DiWol3AO6WpXZgp0goxAV - URL:
https://open.spotify.com/track/0DiWol3AO6WpXZgp0goxAV - 纯ID:
0DiWol3AO6WpXZgp0goxAV
不确定时,请使用完整URI。搜索结果会在字段返回URI——直接传入即可。
uri实体类型:、、、、、。请为操作选择正确的类型——的参数需要专辑/播放列表/艺术家类型的URI;参数需要曲目URI数组。
trackalbumartistplaylistshowepisodespotify_playback.playcontext_uriurisWhat NOT to do
禁止操作
- Don't call before every action. Spotify accepts play/pause/skip without preflight. Only inspect state when the user asked "what's playing" or you need to reason about device/track.
get_state - Don't describe search results unless asked. If the user said "play X", search, grab the top URI, play it. They'll hear it's wrong if it's wrong.
- Don't retry on or
403 Premium required. Those are permanent until user action.403 No active device - Don't use to find a playlist by name — that searches the public Spotify catalog. User playlists come from
spotify_search.spotify_playlists list - Don't mix with album URIs in
kind: "tracks"(or vice versa). The tool normalizes IDs but the API endpoint differs.spotify_library
- 不要在每次操作前调用。 Spotify支持直接执行播放/暂停/跳过操作,无需预检。仅当用户询问“正在播放什么”或你需要了解设备/曲目状态时才检查状态。
get_state - 除非用户要求,否则不要描述搜索结果。 如果用户说“播放X”,直接搜索、获取顶部URI并播放即可。如果内容错误,用户会自行发现。
- 不要在或
403 Premium required错误时重试。 这些错误需要用户执行操作才能解决,重试无效。403 No active device - 不要使用按名称查找播放列表——该工具搜索的是Spotify公开目录。用户的播放列表需要通过
spotify_search获取。spotify_playlists list - 不要在中混合使用
spotify_library和专辑URI(反之亦然)。虽然工具会标准化ID,但对应的API端点不同。kind: "tracks"