get_album
Retrieve detailed Spotify album information using its unique ID, including track listings, release date, album artwork, genre data, and market availability. Enables music discovery and metadata research for playlists.
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 |
|---|---|---|---|
| albumId | Yes | Spotify album ID or URI | |
| token | Yes | Spotify access token for authentication |
Implementation Reference
- src/mcp/tools/albums.ts:34-37 (handler)The handler function that implements the core logic of the 'get_album' tool by calling the Spotify service with the provided token and album ID.handler: async (args: any, spotifyService: SpotifyService) => { const { token, albumId } = args; return await spotifyService.getAlbum(token, albumId); },
- src/mcp/tools/albums.ts:30-33 (schema)The input schema definition for the 'get_album' tool, specifying required parameters: token and albumId.schema: createSchema({ token: commonSchemas.token(), albumId: commonSchemas.spotifyId("album"), }),
- src/mcp/tools/index.ts:22-36 (registration)Registration of the 'get_album' tool by spreading albumTools into the central allTools registry used by ToolRegistrar.export const allTools: ToolsRegistry = { ...albumTools, ...artistTools, ...trackTools, ...playlistTools, ...playbackTools, ...userTools, ...searchTools, };
- src/mcp/server.ts:13-14 (registration)Instantiation of ToolRegistrar in the MCP server, which loads all tools including 'get_album' for serving via MCP protocol.const spotifyService = new SpotifyService(); const toolRegistrar = new ToolRegistrar(spotifyService);
- src/spotify.ts:332-335 (helper)Supporting helper method in SpotifyService that performs the actual API call to retrieve album data from Spotify.async getAlbum(token: string, albumId: string): Promise<SpotifyAlbum> { const id = this.extractId(albumId); return await this.makeRequest<SpotifyAlbum>(`albums/${id}`, token); }