Skip to main content
Glama
Cifero74

mcp-apple-music

get_recommendations

Generate personalized Apple Music recommendations based on your listening preferences. Specify the number of recommendation groups to receive tailored music suggestions.

Instructions

Get personalised Apple Music recommendations.

Args: limit: Number of recommendation groups to return, 1–10 (default 5).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo

Implementation Reference

  • The implementation of the get_recommendations tool handler.
    async def get_recommendations(limit: int = 5) -> str:
        """Get personalised Apple Music recommendations.
    
        Args:
            limit: Number of recommendation groups to return, 1–10 (default 5).
        """
        client = _get_client()
        data = await client.get(
            "/me/recommendations",
            params={"limit": min(max(1, limit), 10)},
        )
        recs = data.get("data", [])
    
        if not recs:
            return "No recommendations available right now."
    
        lines = ["šŸŽÆ Personalised Recommendations:\n"]
        for rec in recs:
            a = rec.get("attributes", {})
            title_obj = a.get("title", {})
            title = (
                title_obj.get("stringForDisplay", "")
                if isinstance(title_obj, dict)
                else str(title_obj)
            ) or "Recommendation"
            lines.append(f"\nšŸ“Œ {title}")

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Cifero74/mcp-apple-music'

If you have feedback or need assistance with the MCP directory API, please join our Discord server