get_track_info
Retrieve detailed Spotify track information by providing a track ID. The tool integrates with the Multi-MCPs server to streamline access to Spotify data and other third-party APIs.
Instructions
Get Spotify track details
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| track_id | Yes |
Implementation Reference
- src/apis/spotify/spotify.ts:125-130 (handler)The main handler function for the 'get_track_info' tool. It validates the Spotify configuration, extracts and validates the track_id from input arguments, and calls the SpotifyClient's getTrack method to retrieve the track information.async get_track_info(args: Record<string, unknown>) { if (!cfg.spotifyClientId || !cfg.spotifyClientSecret) throw new Error("SPOTIFY_CLIENT_ID/SECRET are not configured"); const trackId = String(args.track_id || ""); if (!trackId) throw new Error("track_id is required"); return client.getTrack(trackId); },
- src/apis/spotify/spotify.ts:89-97 (registration)The tool registration object within the registerSpotify function's tools array, defining the name, description, and input schema for 'get_track_info'.{ name: "get_track_info", description: "Get Spotify track details", inputSchema: { type: "object", properties: { track_id: { type: "string" } }, required: ["track_id"], }, },
- src/apis/spotify/spotify.ts:92-96 (schema)Input schema definition for the 'get_track_info' tool, specifying that it requires a 'track_id' string.inputSchema: { type: "object", properties: { track_id: { type: "string" } }, required: ["track_id"], },
- src/apis/spotify/spotify.ts:53-55 (helper)Helper method in SpotifyClient class that performs the actual API request to retrieve track details using the provided trackId.async getTrack(trackId: string) { return this.request(`/tracks/${trackId}`, { headers: await this.authHeaders() }); }