Skip to main content
Glama
Cifero74

mcp-apple-music

create_playlist

Create a new playlist in your Apple Music library by specifying a name and optional description to organize your music collection.

Instructions

Create a new playlist in your Apple Music library.

Args: name: Name for the new playlist. description: Optional short description.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
descriptionNo

Implementation Reference

  • The create_playlist tool implementation that interacts with the Apple Music API to create a new playlist.
    @mcp.tool()
    async def create_playlist(name: str, description: str = "") -> str:
        """Create a new playlist in your Apple Music library.
    
        Args:
            name: Name for the new playlist.
            description: Optional short description.
        """
        client = _get_client()
        body: dict = {"attributes": {"name": name}}
        if description:
            body["attributes"]["description"] = description
    
        data = await client.post("/me/library/playlists", body)
    
        if data.get("data"):
            pl = data["data"][0]
            pl_id = pl.get("id", "?")
            pl_name = pl.get("attributes", {}).get("name", name)
            return f"✅ Playlist created!\nName: {pl_name}\nID: {pl_id}"
    
        return f"✅ Playlist '{name}' created successfully."

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