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
| Name | Required | Description | Default |
|---|---|---|---|
| token | Yes | Spotify access token for authentication | |
| trackId | Yes | Spotify track ID or URI |
Implementation Reference
- src/mcp/tools/tracks.ts:44-47 (handler)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); },
- src/mcp/tools/tracks.ts:40-43 (schema)Zod schema definition for 'get_track' tool inputs: Spotify access token and track ID.schema: createSchema({ token: commonSchemas.token(), trackId: commonSchemas.spotifyId("track"), }),
- src/mcp/tools/index.ts:27-27 (registration)Registration of trackTools (including 'get_track') into the central allTools registry used by the MCP ToolRegistrar....trackTools,
- src/spotify.ts:461-464 (helper)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); }
- src/mcp/server.ts:14-14 (registration)Instantiation of ToolRegistrar with SpotifyService, which registers all tools including 'get_track' for the MCP server.const toolRegistrar = new ToolRegistrar(spotifyService);