Skip to main content
Glama
leehave
by leehave

list_playlists

Retrieve all available playlists on Claude Music MCP to manage and organize your music collection. Ideal for accessing and reviewing your saved playlists quickly.

Instructions

列出所有播放列表

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function for the 'list_playlists' tool. It retrieves all playlists using the PlaylistManager and formats a response listing them with details like name, description, song count, and ID.
    private async handleListPlaylists(args: any) { const playlists = await this.playlistManager.getAllPlaylists(); return { content: [ { type: 'text', text: `📋 所有播放列表:\n\n${playlists.map(playlist => `🎵 ${playlist.name}\n📝 ${playlist.description || '无描述'}\n🎶 ${playlist.songIds.length} 首歌曲\n🆔 ID: ${playlist.id}\n` ).join('\n')}`, }, ], }; }
  • The input schema and metadata for the 'list_playlists' tool defined in the ListToolsRequestHandler response.
    { name: 'list_playlists', description: '列出所有播放列表', inputSchema: { type: 'object', properties: {}, }, },
  • src/index.ts:179-180 (registration)
    The switch case that registers and dispatches 'list_playlists' tool calls to the handler.
    case 'list_playlists': return await this.handleListPlaylists(args);
  • Supporting method in PlaylistManager that provides the list of all playlists used by the tool handler.
    async getAllPlaylists(): Promise<Playlist[]> { return Array.from(this.playlists.values()); }

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/leehave/Claude-Music-Mcp'

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