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'
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"item_id": "<item_id>"
},
"name": "get_item_info"
}
}Input 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()