get_album
Retrieve comprehensive album details from Spotify using the album ID, including track listings, artwork, release dates, and artist information for music discovery and playlist management.
Instructions
Retrieve comprehensive information about a specific album from Spotify using its unique identifier.
π― USE CASES: β’ Check album details before adding to playlist β’ Get track listing for a specific album β’ View album artwork, release date, and artist information β’ Research album metadata for music discovery
π WHAT IT RETURNS: β’ Album name, artists, and release date β’ Complete track listing with durations β’ Album artwork in multiple resolutions β’ Spotify popularity metrics and genre information β’ External URLs and market availability
π EXAMPLES: β’ "Get details for the album 'Abbey Road' by The Beatles" β’ "Show me information about album ID: 1klALx0u4AavZNEvC4LrTL" β’ "I need the track list for this album I found"
β οΈ REQUIREMENTS: β’ Valid Spotify access token with appropriate scopes β’ Album must exist and be available in user's market
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| token | Yes | Spotify access token for authentication | |
| albumId | Yes | Spotify album ID or URI |
Implementation Reference
- src/mcp/tools/albums.ts:5-38 (registration)Primary registration of the 'get_album' MCP tool, defining title, description, input schema, and handler functionget_album: { title: "Get Album", description: `Retrieve comprehensive information about a specific album from Spotify using its unique identifier. π― USE CASES: β’ Check album details before adding to playlist β’ Get track listing for a specific album β’ View album artwork, release date, and artist information β’ Research album metadata for music discovery π WHAT IT RETURNS: β’ Album name, artists, and release date β’ Complete track listing with durations β’ Album artwork in multiple resolutions β’ Spotify popularity metrics and genre information β’ External URLs and market availability π EXAMPLES: β’ "Get details for the album 'Abbey Road' by The Beatles" β’ "Show me information about album ID: 1klALx0u4AavZNEvC4LrTL" β’ "I need the track list for this album I found" β οΈ REQUIREMENTS: β’ Valid Spotify access token with appropriate scopes β’ Album must exist and be available in user's market`, schema: createSchema({ token: commonSchemas.token(), albumId: commonSchemas.spotifyId("album"), }), handler: async (args: any, spotifyService: SpotifyService) => { const { token, albumId } = args; return await spotifyService.getAlbum(token, albumId); }, },
- src/mcp/tools/albums.ts:34-37 (handler)The executable handler logic for the get_album tool, which parses arguments and delegates to SpotifyServicehandler: async (args: any, spotifyService: SpotifyService) => { const { token, albumId } = args; return await spotifyService.getAlbum(token, albumId); },
- src/mcp/tools/albums.ts:30-33 (schema)Input schema for get_album tool using common token and Spotify album ID validatorsschema: createSchema({ token: commonSchemas.token(), albumId: commonSchemas.spotifyId("album"), }),
- src/spotify.ts:332-335 (helper)Core helper function in SpotifyService that fetches album data from Spotify API endpointasync getAlbum(token: string, albumId: string): Promise<SpotifyAlbum> { const id = this.extractId(albumId); return await this.makeRequest<SpotifyAlbum>(`albums/${id}`, token); }
- src/mcp/tools/index.ts:22-23 (registration)Aggregation of all tools including albumTools (containing get_album) into central registry used by MCP serverexport const allTools: ToolsRegistry = { ...albumTools,