Skip to main content
Glama
leehave

Claude Music MCP

by leehave

list_playlists

Retrieve all available playlists from the Claude Music MCP server to view and manage your music collections.

Instructions

列出所有播放列表

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function that implements the core logic of the 'list_playlists' tool. It fetches all playlists using PlaylistManager and formats a response listing their names, descriptions, song counts, and IDs.
    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')}`,
          },
        ],
      };
    }
  • src/index.ts:129-136 (registration)
    Registration of the 'list_playlists' tool in the ListTools response, including its name, description, and empty input schema.
    {
      name: 'list_playlists',
      description: '列出所有播放列表',
      inputSchema: {
        type: 'object',
        properties: {},
      },
    },
  • src/index.ts:179-180 (registration)
    Dispatcher case in the CallToolRequest handler that routes 'list_playlists' calls to the specific handler function.
    case 'list_playlists':
      return await this.handleListPlaylists(args);
  • Input schema definition for the 'list_playlists' tool, which requires no parameters.
    inputSchema: {
      type: 'object',
      properties: {},
    },
  • Supporting method in PlaylistManager that retrieves all playlists, used by the tool handler.
    async getAllPlaylists(): Promise<Playlist[]> {
      return Array.from(this.playlists.values());
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the action ('list all playlists') but doesn't describe traits like whether this is a read-only operation, if it requires authentication, how results are returned (e.g., pagination), or any rate limits. This leaves significant gaps for a tool that likely interacts with a music service.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient phrase ('列出所有播放列表') that directly states the tool's purpose without unnecessary words. It's front-loaded and wastes no space, making it highly concise and well-structured for its simplicity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of annotations and output schema, the description is incomplete. It doesn't explain what 'list all playlists' entails—such as the format of returned data, potential limitations (e.g., only lists user-owned playlists), or error conditions. For a tool with no structured context, this minimal description leaves too much undefined.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0 parameters with 100% coverage, meaning there are no parameters to document. The description doesn't need to add parameter semantics, so it meets the baseline of 4 for having no parameters, as it doesn't introduce confusion or omissions in this area.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description '列出所有播放列表' (List all playlists) clearly states the verb (list) and resource (playlists), making the purpose understandable. However, it doesn't differentiate from sibling tools like 'get_playlist' (which might retrieve a specific playlist), leaving room for ambiguity about scope and specificity.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention scenarios like needing all playlists versus a specific one (using 'get_playlist'), or how it relates to other siblings like 'search_music' for filtering. Without such context, the agent must infer usage from the name alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other 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