remove_track_from_favorites
Remove a track from your TIDAL favorites list to unlike songs and manage your music preferences.
Instructions
Remove a track from user's favorites (unlike a track).
Args: track_id: ID of the track to remove from favorites
Returns: Success status and confirmation
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| track_id | Yes |
Implementation Reference
- src/tidal_mcp/server.py:1223-1252 (handler)Handler function that authenticates if needed and calls tidalapi's session.user.favorites.remove_track(track_id_int) to unlike the track, returning a structured RemoveFromFavoritesResult.@mcp.tool() async def remove_track_from_favorites(track_id: str) -> RemoveFromFavoritesResult: """ Remove a track from user's favorites (unlike a track). Args: track_id: ID of the track to remove from favorites Returns: Success status and confirmation """ if not await ensure_authenticated(): raise ToolError("Not authenticated. Please run the 'login' tool first.") try: track_id_int = int(track_id) await anyio.to_thread.run_sync( session.user.favorites.remove_track, track_id_int ) return RemoveFromFavoritesResult( status="success", item_id=track_id, item_type="track", message=f"Track {track_id} removed from favorites", ) except ValueError: raise ToolError(f"Invalid track ID format: {track_id}") except Exception as e: raise ToolError(f"Failed to remove track from favorites: {str(e)}")
- src/tidal_mcp/models.py:185-192 (schema)Pydantic model defining the output schema for the remove_track_from_favorites tool, used as the return type annotation.class RemoveFromFavoritesResult(BaseModel): """Result of removing an item from favorites.""" status: str = Field(description="Operation status (success/error)") item_id: str = Field(description="ID of the item removed from favorites") item_type: str = Field(description="Type of item (track/album/artist)") message: str = Field(description="Status message")
- src/tidal_mcp/server.py:1223-1223 (registration)FastMCP decorator that automatically registers the remove_track_from_favorites function as an MCP tool.@mcp.tool()