Skip to main content
Glama
spotify-mcp

spotify-mcp

by umsachde

spotify-mcp

一个 MCP 服务器,封装了 spotipy,使 Claude(或任何 MCP 客户端)能够搜索 Spotify 并读取播放列表、已保存的曲目、艺术家目录和发现信号。

专门作为 re-com 的 Spotify 后端构建——设计上以读取为主,不是播放控制服务器。它确实支持创建播放列表并向其中添加曲目(因此 re-com 的推荐列表可以变成真正的播放列表),但没有播放/暂停/队列控制;请查看已有的几个专注于播放的 Spotify MCP 服务器。

工具

工具

描述

search_music(query, filter="track", limit=20)

搜索 Spotify。filter 为 track 或 artist。

get_playlists(limit=None)

列出当前用户的播放列表。省略 limit 以获取全部。

get_playlist_tracks(playlist_id, limit=None)

获取播放列表中的曲目。跳过本地文件/播客节目。

get_saved_tracks(limit=None)

获取用户已保存(“喜欢的歌曲”)的曲目。

get_track(track_id)

获取单个曲目的元数据。

get_recommendations(seed_track_id, limit=25)

Spotify 基于一个种子曲目的算法推荐——最接近 YouTube Music 的电台功能。

get_artist(artist_id)

获取艺术家的个人资料。

get_artist_top_tracks(artist_id)

艺术家的热门曲目(Spotify 限制约为 10 首——没有完整目录端点)。

get_related_artists(artist_id)

与给定艺术家相关的艺术家。

get_recently_played(limit=50)

用户最近播放的曲目。

create_playlist(name, public=False, description="")

创建当前用户拥有的新播放列表。

add_tracks_to_playlist(playlist_id, track_ids)

将曲目(按 ID 或 URI)添加到播放列表,按 100 个一批分块。

logout()

删除缓存的 OAuth 令牌。

一个真实的限制,直说: Spotify 对 2024 年 11 月之后创建且未获得“扩展配额模式”(Spotify 很少授予的手动批准)的 API 应用限制 /recommendations 和 artist_related_artists。如果你的应用没有该模式,get_recommendations 和 get_related_artists 将返回 403——handle_errors 会将其转换为清晰的消息,而不是原始回溯,并且 re-com 的 spotify_client.py 将其视为一个信号不可用,而不是致命错误。search_music、播放列表、已保存曲目和艺术家热门曲目不受影响。

此机器上的其他 Claude Code 项目(例如 re-com)通过 MCP 启动此服务器来调用这些工具,而不是直接与 spotipy/Spotify 通信——这是唯一存放 Spotify 凭据的地方。

Related MCP server: spotify-mcp

设置

1. 注册 Spotify 应用

  1. 前往 Spotify 开发者仪表板,创建一个应用。

  2. 添加与 SPOTIFY_REDIRECT_URI 匹配的重定向 URI(默认为 http://127.0.0.1:8888/callback——你不需要在该端口上实际监听任何内容;请参阅步骤 3)。

  3. 记下应用的客户端 ID 和客户端密钥。

2. 安装依赖

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

3. 进行身份验证

export SPOTIFY_CLIENT_ID="..."
export SPOTIFY_CLIENT_SECRET="..."
python scripts/setup_auth_spotify.py

这会打印一个授权 URL,等待你登录并粘贴你被重定向到的 URL(在 SSH/无头环境下也能正常工作——无需绑定重定向端口),并将生成的令牌写入 .spotify_cache(路径可通过 SPOTIFY_CACHE_PATH 配置)。

.spotify_cache 等同于你的登录会话——切勿提交或分享它。 它已被 gitignore。令牌一旦缓存就会自动刷新;仅当刷新本身开始失败(例如应用的客户端密钥被轮换,或你从 Spotify 账户设置中撤销了访问权限)或 server.py 中的 SCOPE 获得新权限时,才重新运行此脚本(先删除 .spotify_cache,以便授权流程重新提示同意——过期的缓存令牌不会自行获取新范围)。

4. 添加到 Claude Code

claude mcp add spotify -s user \
  -e SPOTIFY_CLIENT_ID="..." \
  -e SPOTIFY_CLIENT_SECRET="..." \
  -e SPOTIFY_CACHE_PATH="$(pwd)/.spotify_cache" \
  -- "$(pwd)/.venv/bin/python" "$(pwd)/server.py"

-s user 使其在任何 Claude Code 会话中可用,而不仅仅是此目录。对 python 解释器、server.py 和 SPOTIFY_CACHE_PATH 使用绝对路径,因为服务器可以从任何工作目录启动。

对于其他 MCP 客户端(Claude Desktop 等),使用它们各自的配置格式,将它们指向相同的命令和环境变量。

测试

单元测试套件(tests/)针对手写的假 spotipy.Spotify 客户端运行——无需网络访问或 Spotify 凭据:

pip install -e ".[dev]"
pytest

错误处理

工具调用将常见故障模式转换为清晰的消息,而不是原始回溯:

  • 缺少/过期的身份验证(401)→ 提示你重新执行 身份验证步骤。

  • 受限/禁止(403)→ 提示你可能是 Spotify API 访问限制(请参阅上面的推荐/相关艺术家注意事项)或缺少 OAuth 范围。

  • 速率限制(429)→ 提示你等待,包括 Spotify 发送的 Retry-After 提示(如果有)。

  • 任何其他 API 或 OAuth 错误都会直接报告,而不是作为原始回溯。

许可证

MIT — 请参阅 LICENSE。

Available Tools

16 tools
add_tracks_to_playlistA

Add tracks to a playlist by Spotify track ID (or URI). Chunks in batches of 100, Spotify's per-request limit.

NameRequiredDescriptionDefault
track_idsYes
playlist_idYes

Output Schema

NameRequiredDescription
resultYes

TDQS

A3.8/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 behavioral burden. It adds useful transparency by noting that batches are chunked to Spotify's 100-item per-request limit, which is beyond the schema. However, it does not disclose other side effects or prerequisites such as playlist ownership, duplicate handling, or whether tracks are appended.

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 two sentences with no filler. The action is front-loaded, and the second sentence adds the key batching detail. Every phrase earns its place.

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 the tool's simple two-parameter contract, the description covers the core operation and the main API limit, and an output schema exists to handle return details. It is not exhaustive (no mention of error cases or ownership), but it is sufficient for correct invocation in the common case.

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?

The input schema has 0% description coverage, so the description must compensate. It does clarify that track_ids accepts Spotify track IDs or URIs, which is meaningful. It does not add detail for playlist_id or explicitly state the 100-item batch behavior as a parameter constraint, so compensation is partial.

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: 'Add tracks to a playlist', with the method (by Spotify track ID or URI). This clearly distinguishes it from siblings like get_playlist_tracks, create_playlist, and search_music without needing to inspect schemas.

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?

The intended use is implied: use this tool when you need to add tracks to an existing playlist. It does not explicitly contrast with alternatives like create_playlist or get_playlist_tracks, nor does it state when not to use it, but the name and description make the primary scenario clear.

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

create_playlistB

Create a new playlist owned by the current user and return it (id, name, ...).

NameRequiredDescriptionDefault
nameYes
publicNo
descriptionNo

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 provided, the description must carry the behavioral disclosure burden. It does state that the playlist is owned by the current user and that the created playlist is returned, which is useful. But it does not disclose authorization requirements, side effects beyond creation, or any limitations such as playlist name uniqueness.

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 a single, well-structured sentence that leads with the action and includes the key ownership and return behavior. There is no filler or redundant wording.

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?

The input schema and presence of an output schema help, but the description alone leaves gaps around parameter meaning and when to select this tool over siblings. It is minimally adequate for a straightforward create call but not fully complete.

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

Parameters1/5

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

Schema description coverage is 0%, so the description needed to explain the parameters (name, public, description), but it does not. The only mention of 'name' refers to the return value, not the input parameter. The schema provides types and defaults but no semantic explanation.

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 uses the specific verb 'Create' with a clear resource, 'a new playlist owned by the current user', and even notes the return value. This distinguishes it from sibling tools like get_playlists or add_tracks_to_playlist without ambiguity.

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?

The purpose strongly implies when to use it: when a new playlist should be created for the current user. However, it does not explicitly mention alternatives or conditions like 'do not use this for adding tracks' or 'use get_playlists to list existing playlists'.

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

get_album_tracksA

Get an album's tracks. Omit limit to fetch all of them.

Album track objects are the "simplified" shape and carry no album key of their own, so callers that need one should attach it from the album they asked for.

NameRequiredDescriptionDefault
limitNo
album_idYes

Output Schema

NameRequiredDescription
resultYes

TDQS

A4.2/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. It discloses a non-obvious output trait: track objects are simplified and lack an `album` key, and it tells callers how to handle that. This goes well beyond a generic 'get' description, though it doesn't mention errors, auth, or rate limits.

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 compact and well-structured: the main action is front-loaded, and the important behavioral caveat about the simplified shape is separated into its own short paragraph. Every sentence adds value.

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?

This is a simple read tool with an output schema available, so the description doesn't need to explain return values. It covers the key non-obvious details: default behavior for `limit` and the missing `album` key in result objects. Minor gaps like explicit routing versus sibling tools prevent a perfect score.

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 adds meaningful semantics for `limit` by explaining that omitting it fetches all tracks, but it doesn't describe valid limit values or elaborate on `album_id` beyond its name and type.

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 clearly states the resource and action: retrieving an album's tracks. It also differentiates the result shape from other track-returning tools by noting the simplified track objects, so an agent can distinguish it from siblings like get_playlist_tracks or get_artist_top_tracks.

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 a clear context for when to call this tool: when you need an album's tracks. The instruction to omit `limit` to fetch all tracks provides a concrete usage rule, though it doesn't explicitly name alternatives or exclusions relative to sibling tools.

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

get_artistB

Get an artist's profile (name, genres, popularity, images).

NameRequiredDescriptionDefault
artist_idYes

Output Schema

NameRequiredDescription

No output parameters

TDQS

B3.1/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It states the tool is a read operation ('Get') but doesn't disclose any behavioral traits such as authentication requirements, rate limits, or what happens if the artist_id is invalid. The output schema exists but the description adds no behavioral context beyond the verb.

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 a single, efficient sentence that front-loads the action and resource, then lists the key return fields. Every word earns its place; no filler or repetition.

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?

The output schema exists, so return values are covered. However, with no annotations and no parameter explanation, the description is incomplete for an agent that needs to know how to construct a valid call (e.g., what artist_id format is expected). It's adequate for a simple lookup but leaves gaps.

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%, and the description does not explain the artist_id parameter beyond its name. The description mentions the profile fields but doesn't clarify the format or source of artist_id (e.g., Spotify ID vs. URL). With only one parameter, the description should have compensated but didn't.

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 ('Get') and resource ('artist's profile'), and lists the fields returned (name, genres, popularity, images). This clearly distinguishes it from siblings like get_artist_top_tracks and get_artist_albums, though it doesn't explicitly name 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?

The description implies usage: call this when you need an artist's profile details. It doesn't explicitly state when to use it versus alternatives like get_artist_top_tracks or get_related_artists, but the field list (name, genres, popularity, images) provides enough context for an agent to infer the right scenario.

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

get_artist_albumsA

Get an artist's albums and singles. Omit limit to fetch all of them.

This plus get_album_tracks is the only route to an artist's real catalog that survives Spotify's post-Nov-2024 restrictions: get_artist_top_tracks 403s for apps without Extended Quota Mode and caps at ~10 even when it works. Appears-on and compilation albums are excluded -- they would credit the artist for other people's records.

NameRequiredDescriptionDefault
limitNo
artist_idYes

Output Schema

NameRequiredDescription
resultYes

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations provided, the description carries full behavioral burden. It discloses the limit-omission behavior (fetch all), the exclusion of appears-on/compilation albums with reasoning, and the Spotify restriction context. This goes well beyond the schema and gives the agent a clear picture of what the tool does and does not return.

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 description is two paragraphs with no wasted words. The core action and limit behavior are front-loaded, followed by the sibling distinction and exclusions. It's slightly longer than minimal but every sentence adds value, so a 4 is appropriate.

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 description covers the essential usage, exclusions, and limitations. An output schema exists, so return-value details are presumably structured there. It doesn't mention pagination or rate limits, but these are secondary given the output schema and the clear scope. Overall, the description is complete enough for an agent to use the 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?

The schema has 0% description coverage, so the description must compensate. It explains the `limit` parameter's semantics ('Omit limit to fetch all of them') which adds meaning beyond the schema's type/default. The `artist_id` parameter is self-evident from its name. This is sufficient compensation for a two-parameter tool.

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 clearly states the verb 'Get' and resource 'an artist's albums and singles.' It explicitly distinguishes itself from get_artist_top_tracks and positions itself as one of two viable routes to the real catalog, making its purpose unambiguous.

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?

It provides explicit when-to-use guidance by naming the alternative get_artist_top_tracks and explaining its failure modes (403 without Extended Quota Mode, caps at ~10). It also states what is excluded (appears-on and compilation albums) and why, so an agent knows exactly when to choose this tool over others.

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

get_artist_top_tracksB

Get an artist's top tracks (Spotify caps this at ~10 -- there's no "full catalog" endpoint the way YouTube Music's channel Songs tab has).

NameRequiredDescriptionDefault
artist_idYes

Output Schema

NameRequiredDescription
resultYes

TDQS

B3.1/5.0
Behavior3/5

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

With no annotations, the description carries the burden of behavioral disclosure. It usefully reveals the ~10 track cap and the absence of a full-catalog endpoint, which are meaningful constraints. It does not mention auth, error behavior, or other side effects, but the tool is a simple read operation and output schema exists.

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 one tight, front-loaded sentence with the core action stated first. The parenthetical is useful context about the tool's limits, not filler, so every part earns its place.

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?

For a one-parameter lookup with an output schema, the description is mostly adequate and the cap note is valuable. However, it omits usage context such as how top tracks relate to the other track/album endpoints and provides no parameter guidance, leaving some gaps for the agent to infer.

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%, and the description adds no information about the artist_id parameter beyond the name already present in the schema. It does not specify whether this is a Spotify ID, URI, or URL, so it fails to compensate for the low schema coverage.

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 clearly identifies the operation: 'Get an artist's top tracks,' naming a specific resource and action. It does not explicitly distinguish this from sibling tools like get_artist_albums or get_album_tracks, so it stops short of a 5.

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

Usage Guidelines2/5

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

There is no guidance about when to choose this tool over the many sibling track/album tools, nor any when-not-to-use note. The parenthetical explains a platform limitation but does not route the agent to an alternative or state selection criteria.

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

get_current_userA

Get the authenticated user's own profile (id, display_name, ...).

The id is the only way to tell a playlist the user owns from one they merely follow: get_playlists returns both, indistinguishable except by owner.id. That distinction is load-bearing rather than cosmetic -- Spotify 403s playlist_items on another user's playlist, so a caller that treats followed playlists as its own gets an error it cannot act on.

NameRequiredDescriptionDefault

No parameters

Output Schema

NameRequiredDescription

No output parameters

TDQS

A4.5/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 behavioral burden. It makes the read-only nature evident through 'Get,' clarifies that the result is the authenticated user's own profile, and adds a load-bearing consequence about playlist ownership. It doesn't discuss rate limits or errors, but for a zero-parameter getter with an output schema, this is sufficient.

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 purpose is front-loaded in the first sentence, and the second paragraph is compact but substantive: it explains why the returned id matters and prevents a common authorization failure. Every sentence earns its place; there is no filler.

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 zero parameters, a low-complexity read operation, and an existing output schema, the description provides everything an agent needs: what the tool returns, that it is the authenticated user's profile, and why the id is critical for playlist ownership decisions. No essential guidance is missing.

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 has zero parameters and the schema already represents that with 100% coverage, so there is nothing for the description to add. Per the baseline for 0 parameters, a 4 is appropriate.

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: 'Get the authenticated user's own profile (id, display_name, ...).' This clearly identifies what the tool does and is distinct from sibling tools like get_playlists or get_saved_tracks, so an agent can differentiate it without opening schemas.

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 strong contextual guidance: get_playlists returns both owned and followed playlists, and owner.id is the only way to distinguish them. It doesn't explicitly say 'use this tool when you need the current user's id,' but the implication is clear and reinforced by the Spotify 403 consequence.

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

get_playlistsA

List the current user's playlists. Omit limit to fetch all of them.

NameRequiredDescriptionDefault
limitNo

Output Schema

NameRequiredDescription
resultYes

TDQS

A3.8/5.0
Behavior3/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 usefully discloses the default behavior ('Omit limit to fetch all of them') and implies a read-only operation with 'List'. However, it does not mention auth requirements, pagination behavior, or what happens when limit is explicitly provided.

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?

Two short sentences with no filler. The core purpose is front-loaded and the second sentence adds necessary parameter nuance without redundancy.

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 low-complexity read-only list tool with an output schema and a single optional parameter, the description is nearly complete. It covers the key behavior and default, though it omits minor details like permission requirements and limit edge cases.

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%, so the description adds real value by explaining that omitting limit fetches all playlists. This conveys the parameter's purpose and default semantics beyond the bare schema type and default value.

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 uses a specific verb ('List') and a clear resource ('the current user's playlists'), which distinguishes it from siblings like get_playlist_tracks or create_playlist. The scope is unambiguous even without naming alternatives.

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

Usage Guidelines2/5

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

There is no explicit guidance on when to use this tool versus alternatives such as get_playlist_tracks or create_playlist. The phrase 'current user's playlists' gives context, but no exclusions, prerequisites, or route-to-sibling instructions are provided.

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

get_playlist_tracksA

Get the tracks in a playlist. Omit limit to fetch the entire playlist.

Local files and episodes (no track id) are skipped. See _track_of for the two payload shapes this has to read.

NameRequiredDescriptionDefault
limitNo
playlist_idYes

Output Schema

NameRequiredDescription
resultYes

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the transparency burden and does meaningful work: it discloses that local files and episodes without a track id are skipped and warns that two payload shapes need to be handled via `_track_of`. It stops short of explaining auth, error, or return details, but the output schema covers return shape and no side-effect hazards remain hidden.

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 three short sentences with no filler: purpose first, limit behavior second, edge-case handling third. Every sentence contributes information an agent needs.

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 two-parameter fetch with an output schema present, the description covers the main invocation choice, the edge cases, and the payload complexity. It is not exhaustive about failure modes or authentication, but those are not necessary for a simple playlist-track lookup.

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 the parameters. It adds real meaning for `limit` ('omit to fetch the entire playlist'), but `playlist_id` is only implied by the tool name and sentence rather than explicitly documented.

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 a specific verb and object: 'Get the tracks in a playlist,' which clearly identifies both the action and the target resource. The tool name and sibling set make its scope obvious, and it is distinct from album, saved-track, and individual-track lookups.

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?

It gives a concrete behavioral instruction: omit `limit` to fetch the entire playlist, implying limit should be supplied when a partial fetch is desired. It does not explicitly state when a sibling tool should be preferred, but the playlist-scoped context is clear enough for an agent to route correctly.

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

get_recently_playedB

Get the user's recently played tracks (each item wraps a "track" key).

NameRequiredDescriptionDefault
limitNo

Output Schema

NameRequiredDescription
resultYes

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 more responsibility. It does disclose the read-only nature through 'Get' and adds a useful response-shape detail with 'each item wraps a track key.' However, it says nothing about authentication, pagination, rate limits, or error behavior, so the behavioral disclosure is only partial.

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 a single front-loaded sentence that states the verb and resource immediately. The parenthetical about the 'track' key is brief and adds meaningful return-shape information without padding.

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?

For a simple tool with one optional parameter and an output schema, the description is nearly sufficient. However, it lacks usage guidance against similar siblings and provides minimal parameter context, while the absence of annotations leaves some safety/behavioral expectations unstated.

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% and the description never mentions the limit parameter. The parameter name 'limit' and default 50 give a reasonable hint, but the description adds no semantic value beyond the schema, so it fails to compensate for missing parameter documentation.

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 clearly identifies the resource and action: 'Get the user's recently played tracks.' The phrase 'recently played' distinguishes this from sibling tools like get_saved_tracks and get_playlist_tracks, so an agent can tell them apart without ambiguity.

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

Usage Guidelines2/5

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

There is no explicit guidance about when to use this tool versus alternatives such as get_saved_tracks or get_playlist_tracks. The description implies the use case by naming 'recently played,' but it never states exclusions, prerequisites, or why an agent should choose this over a sibling.

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

get_recommendationsA

Get Spotify's algorithmic recommendations seeded from one track.

May 403 if this app doesn't have access to /recommendations -- Spotify restricts it for apps created after Nov 2024 without Extended Quota Mode.

NameRequiredDescriptionDefault
limitNo
seed_track_idYes

Output Schema

NameRequiredDescription
resultYes

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations present, the description carries the behavioral disclosure burden. It proactively discloses the potential 403 error and why it can occur (Spotify's Extended Quota Mode restriction), which is valuable. However, it does not explicitly state that the operation is read-only or mention rate limits, though 'Get' implies a read.

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 exceptionally concise: one clear purpose sentence followed by a focused caveat. No filler or redundant explanations, and the most important information is front-loaded.

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 two-parameter tool with an output schema, the description is nearly complete: it explains the key input semantics and the important failure mode. The only gaps are the optional limit behavior and the null allowance, but these are visible in the schema, so the description is still adequate.

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%, so the description must compensate. It adds meaning to seed_track_id ('seeded from one track') but leaves limit unexplained and does not address the schema's allowance for null in seed_track_id or the expected track ID format. This is insufficient for a low-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?

The description uses a specific verb ('Get') and resource ('Spotify's algorithmic recommendations') and clarifies the seeding basis ('from one track'). This distinguishes it from sibling tools like search_music or get_artist_top_tracks without needing to inspect schemas.

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?

The description implies the usage context (recommendations seeded from a single track) but does not explicitly state when to choose this over alternatives such as get_related_artists or get_artist_top_tracks. There are no exclusion conditions or alternative tool references.

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

get_saved_tracksA

Get the current user's saved ("Liked Songs") tracks. Omit limit for all of them.

NameRequiredDescriptionDefault
limitNo

Output Schema

NameRequiredDescription
resultYes

TDQS

A4/5.0
Behavior3/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 does disclose one useful behavioral trait: omitting limit returns all tracks rather than a default page. But it does not mention read-only behavior, authentication expectations, ordering, or pagination details, so the burden is only partially met.

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 two short sentences with no filler. The main purpose is front-loaded, and the limit instruction earns its place because it changes the default behavior of the only parameter.

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 one-parameter read-only tool with an output schema, the description is reasonably complete: it states what is returned and how to request all items. The main gaps are the lack of explicit sibling differentiation and broader behavioral context, but these are already reflected in other dimensions.

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%, so the description must compensate. It adds meaning beyond the schema by explaining that omitting limit returns all tracks, which the schema's bare 'default: null' does not convey. It does not spell out valid integer bounds, but for a single optional limit parameter this is sufficient.

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 uses a specific verb and resource: 'Get the current user's saved (

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?

The resource is clear enough that an agent can infer when to use this tool: whenever the current user's saved tracks are needed. However, there is no explicit mention of alternatives or any when-not-to-use guidance relative to siblings like get_playlist_tracks or get_album_tracks.

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

get_trackB

Get a single track's metadata (title, artists, album, ...).

NameRequiredDescriptionDefault
track_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 must carry the behavioral disclosure burden; 'Get' and 'metadata' imply a read-only retrieval and signal no mutation, which is adequate for a simple lookup. However, it does not mention error responses, authentication requirements, or the absence of side effects beyond what the verb implies.

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 a single front-loaded sentence with no filler; every word contributes to defining the operation and the metadata examples add useful detail without bloat.

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?

The tool is simple, has only one parameter, and an output schema exists, so the description is minimally viable. It lacks guidance on obtaining track_id, error scenarios, and interaction with sibling tools, leaving some context gaps.

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% and the description does not explain the track_id parameter beyond its name. It does not specify ID format, where to obtain it, or any constraints, so the description adds little to the raw 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 uses a specific verb ('Get') and names a precise resource ('a single track's metadata') with examples of included fields, which distinguishes it from sibling tools like get_album_tracks, get_playlist_tracks, and get_saved_tracks that operate on different collections.

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

Usage Guidelines2/5

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

The description offers no guidance on when to use this tool versus alternatives such as search_music or get_album_tracks, no prerequisites, and no indication of how to obtain a valid track_id. Usage context must be inferred entirely from the tool name.

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

logoutA

Delete the cached Spotify OAuth token.

Subsequent tool calls will fail until you re-authenticate via scripts/setup_auth_spotify.py.

NameRequiredDescriptionDefault

No parameters

Output Schema

NameRequiredDescription
resultYes

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It transparently states that it deletes the cached token and that calls will fail until re-authentication, which is a key behavioral consequence. It does not cover every edge case (e.g., server-side effects), but for a local token deletion this is sufficient.

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 extremely concise—two sentences that state the action and its consequence. No filler or redundant information, and the key fact is front-loaded.

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?

The tool is simple, has no parameters, and has an output schema, so the description does not need to explain return values. It covers purpose, effect, and recovery steps, making it complete for an agent to decide and call it 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?

The tool has zero parameters (schema coverage 100% with empty properties), so the baseline of 4 applies. The description adds no parameter-specific meaning because there are none to describe.

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 clearly states the action ('Delete the cached Spotify OAuth token') with a specific verb and resource. It is easily distinguished from sibling tools that deal with music and playlists, as this is the only auth-related tool.

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?

The description does not explicitly state when to use this tool, but it implies usage by describing the consequence (subsequent calls fail until re-auth). It also suggests the re-authentication path, which gives some context, but no explicit when-to-use or alternatives are mentioned.

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

search_musicC

Search Spotify. filter is "track" or "artist".

NameRequiredDescriptionDefault
limitNo
queryYes
filterNotrack

Output Schema

NameRequiredDescription
resultYes

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are present, so the description bears the full disclosure burden. It implies a read-only search operation, but it does not mention behavior such as pagination, limit effects, result ordering, or the fact that search is restricted to tracks/artists beyond the filter parameter itself. This is minimal behavioral transparency.

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 description is extremely concise with no filler; both sentences earn their place and the key parameter hint is front-loaded. It borders on under-specification, but that issue is more relevant to contextual completeness than to conciseness.

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

Completeness2/5

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

With no annotations and only a one-sentence description, the tool is under-specified for confident use among 15 siblings. The output schema helps with return values, but the description still lacks usage context, query expectations, and behavioral details needed for a 3-parameter tool.

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 usefully explains the filter parameter's allowed values ('track' or 'artist'), which is the least obvious parameter. Query is reasonably inferable from its name, but limit receives no semantic explanation, so compensation is only partial.

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 clear operation ('Search') and resource ('Spotify'), and the filter line narrows the target to tracks or artists. It is understandable on its own, though it does not explicitly differentiate itself from sibling get_track or get_artist tools.

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

Usage Guidelines2/5

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

There is no guidance about when to use this tool versus alternatives such as get_track, get_artist, or get_recommendations. No conditions, exclusions, or preferred use cases are given, so the agent must infer when search is appropriate.

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. 16 tool updatesv0.1.0
    • First observedadd_tracks_to_playlist
    • First observedcreate_playlist
    • First observedget_album_tracks
    • First observedget_artist
    • First observedget_artist_albums
    • First observedget_artist_top_tracks
    • First observedget_current_user
    • First observedget_playlist_tracks
    • First observedget_playlists
    • First observedget_recently_played
    • First observedget_recommendations
    • First observedget_related_artists
    • First observedget_saved_tracks
    • First observedget_track
    • First observedlogout
    • First observedsearch_music

TDQS

A3.5/5.0

Scored across 16 tools

Disambiguation4/5

Most tools are clearly distinct by resource (tracks, playlists, artists, albums, user). Minor overlap: get_playlist_tracks vs get_saved_tracks vs get_recently_played all return track lists, but their source contexts are clear. get_artist_top_tracks and get_artist_albums both provide artist catalog access, though descriptions clarify the distinction.

Naming Consistency4/5

The set predominantly follows a verb_noun pattern (get_*, create_playlist, add_tracks_to_playlist, search_music, logout). The two exceptions are search_music and logout, which are still readable and not jarring. Overall consistent and predictable.

Tool Count4/5

16 tools is slightly above the ideal 3-15 range but appropriate for Spotify's broad domain (search, user library, playlists, artists, albums, recommendations). Each tool covers a distinct need; no obvious redundancy.

Completeness3/5

The surface covers search, playlist CRUD (create, read, add tracks), saved tracks, artist/album browsing, and user info. Notable gaps: no update/delete playlist, no remove tracks from playlist, no play/control playback, no track/album search filtering beyond track/artist, and no user's top items. Core browsing is solid but lifecycle coverage is incomplete.

Maintenance

ActivitySlowing
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    B
    quality
    D
    maintenance
    An MCP server that enables users to control Spotify playback, search music, and manage playlists through natural conversation. It is updated for the February 2026 Spotify Web API changes and supports full playlist CRUD operations.
    6
    8
    MIT
  • A
    license
    Not graded
    quality
    F
    maintenance
    An MCP server that enables users to control Spotify playback, search for music, and manage playlists through MCP-compatible clients. It supports features like track recommendations and playback management using secure OAuth authentication.
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    An unofficial MCP server that provides access to Spotify's Web API through the Model Context Protocol, enabling AI assistants to search music, manage playlists, and control playback.
    30 npm
    9
    ISC