get_item_info
Retrieve detailed metadata for Spotify tracks, albums, artists, or playlists by providing their Spotify ID and type to access comprehensive information.
Instructions
Get detailed information about a Spotify item
Args:
item_id: Spotify ID
type: One of 'track', 'album', 'artist', 'playlist'
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| item_id | Yes | ||
| type | No | track |
Implementation Reference
- main.py:90-98 (handler)The main handler function for the 'get_item_info' tool. It is decorated with @mcp.tool() which also serves as the registration. The function fetches detailed information about a Spotify item (track, album, artist, or playlist) using the SpotifyClient instance.@mcp.tool() async def get_item_info(item_id: str, type: str = "track") -> str: """ Get detailed information about a Spotify item Args: item_id: Spotify ID type: One of 'track', 'album', 'artist', 'playlist' """ return await client.get_info(item_id, type)
- main.py:90-90 (registration)The @mcp.tool() decorator registers the get_item_info function as an MCP tool.@mcp.tool()