Skip to main content
Glama

get_track

Retrieve detailed metadata, audio characteristics, and availability for any Spotify track using a valid access token and track ID. Ideal for music research, cataloging, and application development.

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

  • The core handler function for the 'get_track' MCP tool. It extracts token and trackId from arguments and delegates to SpotifyService.getTrack for execution.
    handler: async (args: any, spotifyService: SpotifyService) => { const { token, trackId } = args; return await spotifyService.getTrack(token, trackId); },
  • Zod schema definition for 'get_track' tool inputs: Spotify access token and track ID.
    schema: createSchema({ token: commonSchemas.token(), trackId: commonSchemas.spotifyId("track"), }),
  • Registration of trackTools (including 'get_track') into the central allTools registry used by the MCP ToolRegistrar.
    ...trackTools,
  • SpotifyService.getTrack helper method that performs the actual Spotify API request to retrieve track details.
    async getTrack(token: string, trackId: string): Promise<SpotifyTrack> { const id = this.extractId(trackId); return await this.makeRequest<SpotifyTrack>(`tracks/${id}`, token); }
  • Instantiation of ToolRegistrar with SpotifyService, which registers all tools including 'get_track' for the MCP server.
    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