Skip to main content
Glama

itunes_library

Generate a summary of your Apple Music library, including total tracks and user playlists, for easy management and organization on macOS via MCP commands.

Instructions

Return a summary of the Music library, including total tracks and user playlists.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'itunes_library' tool. It runs an AppleScript via run_applescript to query the Music app for the total number of tracks in the Library playlist and the total number of user playlists, returning a formatted summary string.
    @mcp.tool() def itunes_library() -> str: """ Return a summary of the Music library, including total tracks and user playlists. """ script = """ tell application "Music" set totalTracks to count of every track of playlist "Library" set totalPlaylists to count of user playlists return "Total tracks: " & totalTracks & linefeed & "Total playlists: " & totalPlaylists end tell """ return run_applescript(script)

Other Tools

Related Tools

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/kennethreitz/mcp-applemusic'

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