spotify-mcp
spotify-mcp
MCP 서버로, spotipy를 감싸서 Claude(또는 모든 MCP 클라이언트)가 Spotify를 검색하고 플레이리스트, 저장된 트랙, 아티스트 카탈로그, 탐색 신호를 읽을 수 있게 합니다.
re-com의 Spotify 백엔드로 특별히 제작되었습니다. 설계상 읽기 중심이며, 재생 제어 서버가 아닙니다. 플레이리스트 생성과 트랙 추가는 지원하므로 re-com 추천 목록이 실제 플레이리스트가 될 수 있지만, 재생/일시정지/큐 제어는 없습니다. 그런 기능이 필요하다면 이미 있는 여러 재생 중심 Spotify MCP 서버 중 하나를 참고하세요.
도구
도구 | 설명 |
| Spotify를 검색합니다. |
| 현재 사용자의 플레이리스트를 나열합니다. |
| 플레이리스트의 트랙을 가져옵니다. 로컬 파일/에피소드는 건너뜁니다. |
| 사용자가 저장한("Liked Songs") 트랙을 가져옵니다. |
| 단일 트랙의 메타데이터를 가져옵니다. |
| 하나의 시드 트랙에서 Spotify의 알고리즘 추천을 제공합니다. YouTube Music의 라디오와 가장 유사합니다. |
| 아티스트의 프로필을 가져옵니다. |
| 아티스트의 인기 트랙(Spotify는 ~10개로 제한하며 전체 카탈로그 엔드포인트는 없습니다). |
| 주어진 아티스트와 관련된 아티스트들을 가져옵니다. |
| 사용자가 최근에 재생한 트랙을 가져옵니다. |
| 현재 사용자가 소유한 새 플레이리스트를 생성합니다. |
| 트랙(ID 또는 URI)을 플레이리스트에 추가합니다. 100개씩 배치로 나누어 처리합니다. |
| 캐시된 OAuth 토큰을 삭제합니다. |
실제 제약을 분명히 말하자면: Spotify는 2024년 11월 이후 생성되었고 "Extended Quota Mode"(Spotify가 아주 드물게 승인하는 수동 승인)가 없는 API 앱에 대해 /recommendations 및 artist_related_artists를 제한합니다. 앱에 이 권한이 없으면 get_recommendations와 get_related_artists는 403을 반환합니다. handle_errors는 이를 원시 traceback 대신 명확한 메시지로 바꾸며, re-com의 spotify_client.py는 이를 치명적 오류가 아닌 하나의 신호를 사용할 수 없는 것으로 처리합니다. search_music, 플레이리스트, 저장된 트랙, 아티스트 인기 트랙은 영향을 받지 않습니다.
이 머신의 다른 Claude Code 프로젝트(예: re-com)는 spotipy/Spotify에 직접 통신하는 대신 MCP로 이 서버를 실행하여 이러한 도구를 호출합니다. 이곳이 Spotify 자격 증명이 존재하는 유일한 곳입니다.
Related MCP server: spotify-mcp
설정
1. Spotify 앱 등록
Spotify Developer Dashboard로 이동하여 앱을 생성합니다.
SPOTIFY_REDIRECT_URI와 일치하는 리다이렉트 URI를 추가합니다(기본값은http://127.0.0.1:8888/callback— 해당 포트에서 실제로 수신 대기 중인 것이 필요하지 않습니다. 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를 삭제해야 인증 흐름이 동의를 다시 요청합니다. 오래된 캐시 토큰은 새 scope를 자동으로 획득하지 못합니다).
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/)는 직접 만든 fake spotipy.Spotify 클라이언트로 실행되므로 네트워크 액세스나 Spotify 자격 증명이 필요 없습니다:
pip install -e ".[dev]"
pytest오류 처리
도구 호출은 일반적인 실패 상황을 원시 traceback 대신 명확한 메시지로 변환합니다:
누락/만료된 인증(401) → 인증 단계를 다시 수행하라고 안내합니다.
제한/금지(403) → Spotify API 액세스 제한(위의 추천/관련 아티스트 주의사항 참조) 또는 누락된 OAuth scope 때문일 가능성이 높다고 안내합니다.
속도 제한(429) → Spotify가 보낸 경우
Retry-After힌트를 포함하여 기다리라고 안내합니다.다른 API 또는 OAuth 오류는 원시 traceback이 아닌 직접 보고됩니다.
라이선스
MIT — LICENSE 참조.
Available Tools
16 toolsadd_tracks_to_playlistA
Add tracks to a playlist by Spotify track ID (or URI). Chunks in batches of 100, Spotify's per-request limit.
| Name | Required | Description | Default |
|---|---|---|---|
| track_ids | Yes | ||
| playlist_id | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
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.
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.
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.
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.
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.
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, ...).
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| public | No | ||
| description | No |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
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.
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.
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.
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.
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.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| album_id | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
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.
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.
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.
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.
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.
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).
| Name | Required | Description | Default |
|---|---|---|---|
| artist_id | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
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.
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.
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.
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.
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.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| artist_id | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
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.
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.
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.
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.
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.
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).
| Name | Required | Description | Default |
|---|---|---|---|
| artist_id | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
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.
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.
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.
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.
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.
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.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
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.
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.
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.
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.
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.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
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.
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.
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.
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.
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.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| playlist_id | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
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.
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.
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.
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.
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.
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).
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
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.
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.
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.
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.
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.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| seed_track_id | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
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.
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.
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.
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.
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.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
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.
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.
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.
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.
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.
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, ...).
| Name | Required | Description | Default |
|---|---|---|---|
| track_id | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
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.
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.
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.
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.
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.
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.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
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.
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.
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.
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.
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.
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".
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| query | Yes | ||
| filter | No | track |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
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.
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.
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.
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.
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.
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.
16 tool updates
v0.1.0- First observed
add_tracks_to_playlist - First observed
create_playlist - First observed
get_album_tracks - First observed
get_artist - First observed
get_artist_albums - First observed
get_artist_top_tracks - First observed
get_current_user - First observed
get_playlist_tracks - First observed
get_playlists - First observed
get_recently_played - First observed
get_recommendations - First observed
get_related_artists - First observed
get_saved_tracks - First observed
get_track - First observed
logout - First observed
search_music
TDQS
Scored across 16 tools
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.
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.
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.
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
Related MCP Connectors
Spotify MCP — Web API via client_credentials OAuth
MCP server for Russian books search, details, and recommendation candidates.
An MCP server that provides tools to discover and retrieve podcast episodes transcripts.
Full Spotify Web API coverage - albums, artists, playlists, player controls, and more.
Related MCP Servers
- AlicenseBqualityDmaintenanceAn 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.68MIT
- AlicenseNot gradedqualityFmaintenanceAn 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
- AlicenseNot gradedqualityDmaintenanceAn 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.13 npm9ISC
- FlicenseNot gradedqualityDmaintenanceA MCP server for controlling Spotify playback, searching for content, and managing playlists via OAuth authentication.1-