Skip to main content
Glama

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

TableJSON Schema
NameRequiredDescriptionDefault
albumIdYesSpotify album ID or URI
tokenYesSpotify access token for authentication

Implementation Reference

  • 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); },
  • The input schema definition for the 'get_album' tool, specifying required parameters: token and albumId.
    schema: createSchema({ token: commonSchemas.token(), albumId: commonSchemas.spotifyId("album"), }),
  • 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, };
  • 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);
  • 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); }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/latiftplgu/Spotify-OAuth-MCP-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server