Skip to main content
Glama

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

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

Implementation Reference

  • Primary registration of the 'get_album' MCP tool, defining title, description, input schema, and handler function
    get_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); }, },
  • The executable handler logic for the get_album tool, which parses arguments and delegates to SpotifyService
    handler: async (args: any, spotifyService: SpotifyService) => { const { token, albumId } = args; return await spotifyService.getAlbum(token, albumId); },
  • Input schema for get_album tool using common token and Spotify album ID validators
    schema: createSchema({ token: commonSchemas.token(), albumId: commonSchemas.spotifyId("album"), }),
  • Core helper function in SpotifyService that fetches album data from Spotify API endpoint
    async getAlbum(token: string, albumId: string): Promise<SpotifyAlbum> { const id = this.extractId(albumId); return await this.makeRequest<SpotifyAlbum>(`albums/${id}`, token); }
  • Aggregation of all tools including albumTools (containing get_album) into central registry used by MCP server
    export const allTools: ToolsRegistry = { ...albumTools,

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