Skip to main content
Glama

get_track

Retrieve detailed metadata and audio characteristics for specific Spotify tracks to support music research, application development, and content verification.

Instructions

Retrieve comprehensive information about any specific track including detailed metadata and audio characteristics.

🎯 USE CASES: • Research song details for music blogs or articles • Analyze track metadata for music applications • Get complete song information for sharing or playlisting • Verify track details and availability before use • Build detailed music catalogs and databases

📝 WHAT IT RETURNS: • Complete track information (title, artist, album, duration) • Release date, popularity scores, and market availability • Track artwork, preview URLs, and external links • Explicit content flags and parental guidance information • ISRC codes and other professional identifiers

🔍 EXAMPLES: • "Get details for 'Hotel California' by Eagles" • "Show me information about track ID: 40riOy7x9W7GXjyGp4pjAv" • "I need complete details for this specific song" • "Get metadata for the track I just discovered"

💡 DETAILED INSIGHTS: • Professional music industry identifiers • Cross-platform compatibility information • Regional availability and licensing details • Perfect for music research and analysis • Essential for building music applications

⚠️ REQUIREMENTS: • Valid Spotify access token • Track must exist and be available in user's market

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tokenYesSpotify access token for authentication
trackIdYesSpotify track ID or URI

Implementation Reference

  • MCP tool handler for 'get_track' which extracts arguments and delegates to SpotifyService.getTrack
    handler: async (args: any, spotifyService: SpotifyService) => { const { token, trackId } = args; return await spotifyService.getTrack(token, trackId); },
  • Input schema for get_track tool defining token and trackId parameters
    schema: createSchema({ token: commonSchemas.token(), trackId: commonSchemas.spotifyId("track"), }),
  • Registration of all tools including trackTools (containing get_track) into the central allTools registry used by ToolRegistrar
    export const allTools: ToolsRegistry = { ...albumTools, ...artistTools, ...trackTools, ...playlistTools, ...playbackTools, ...userTools, ...searchTools, };
  • Core helper function SpotifyService.getTrack that fetches track details from Spotify API via makeRequest
    async getTrack(token: string, trackId: string): Promise<SpotifyTrack> { const id = this.extractId(trackId); return await this.makeRequest<SpotifyTrack>(`tracks/${id}`, token); }
  • Instantiates ToolRegistrar with SpotifyService, which registers all tools including get_track for the MCP server
    const spotifyService = new SpotifyService(); const toolRegistrar = new ToolRegistrar(spotifyService);

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