Skip to main content
Glama
superseoworld

MCP Spotify Server

get_playlist

Retrieve a Spotify user's playlist details including tracks and metadata by providing the playlist ID or URI.

Instructions

Get a playlist owned by a Spotify user

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesThe Spotify ID or URI of the playlist
marketNoOptional. An ISO 3166-1 alpha-2 country code

Implementation Reference

  • Core implementation of the 'get_playlist' tool. Normalizes the playlist ID, handles optional market parameter, and fetches playlist data via Spotify API GET /playlists/{id}.
    async getPlaylist(args: PlaylistArgs) {
      const playlistId = this.extractPlaylistId(args.id);
      const { market } = args;
    
      const params = { market };
      return this.api.makeRequest(
        `/playlists/${playlistId}${this.api.buildQueryString(params)}`
      );
    }
  • TypeScript type definition for input arguments: required 'id' (Spotify playlist ID or URI) extending MarketParams (optional market).
    export interface PlaylistArgs extends MarketParams {
      id: string;
    }
  • src/index.ts:444-459 (registration)
    MCP tool registration in listTools response, including name, description, and JSON input schema.
    name: 'get_playlist',
    description: 'Get a playlist owned by a Spotify user',
    inputSchema: {
      type: 'object',
      properties: {
        id: {
          type: 'string',
          description: 'The Spotify ID or URI of the playlist'
        },
        market: {
          type: 'string',
          description: 'Optional. An ISO 3166-1 alpha-2 country code'
        }
      },
      required: ['id']
    },
  • src/index.ts:829-835 (registration)
    Dispatch handler in CallToolRequest that validates args and calls the playlistsHandler.getPlaylist.
    case 'get_playlist': {
      const args = this.validateArgs<PlaylistArgs>(request.params.arguments, ['id']);
      const result = await this.playlistsHandler.getPlaylist(args);
      return {
        content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
      };
    }
  • Utility method used by getPlaylist to normalize Spotify playlist URI to plain ID.
    private extractPlaylistId(id: string): string {
      return id.startsWith('spotify:playlist:') ? id.split(':')[2] : id;
    }
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 'Get a playlist' but doesn't clarify if this is a read-only operation, what permissions are needed, how errors are handled, or the format of the return data. For a tool with no annotations, this leaves significant gaps in understanding its behavior.

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 sentence that directly states the tool's purpose without any fluff or redundancy. It's front-loaded and appropriately sized, making it easy to parse quickly.

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 data is returned (e.g., playlist details, tracks, or metadata), potential limitations, or error conditions. For a tool in a rich API context with siblings, more context is needed to guide effective use.

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

Parameters3/5

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

The description adds no parameter semantics beyond what the input schema provides, which has 100% coverage with clear descriptions for 'id' and 'market'. Since the schema fully documents the parameters, the baseline score of 3 is appropriate, as the description doesn't need to compensate but also doesn't add extra value.

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

Purpose4/5

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

The description clearly states the action ('Get') and resource ('a playlist owned by a Spotify user'), making the purpose understandable. However, it doesn't explicitly differentiate from sibling tools like 'get_playlist_items' or 'get_playlist_tracks', which might retrieve related but different data, leaving some ambiguity in scope.

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, such as 'get_current_user_playlists' for listing playlists or 'get_playlist_items' for detailed track information. There's no mention of prerequisites, context, or exclusions, leaving usage unclear.

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/superseoworld/mcp-spotify'

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