Skip to main content
Glama
superseoworld

MCP Spotify Server

get_category_playlists

Retrieve Spotify playlists by category ID to discover curated music collections for specific genres or moods. Specify category and optional limits to browse relevant playlists.

Instructions

Get a list of Spotify playlists tagged with a particular category

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
category_idYesThe Spotify category ID
limitNoOptional. Maximum number of playlists (1-50)
offsetNoOptional. Index of the first playlist to return

Implementation Reference

  • The core handler function that implements the logic for 'get_category_playlists' by making a Spotify API request to retrieve playlists for a given category.
    async getCategoryPlaylists(args: GetCategoryPlaylistsArgs) {
      const { category_id, limit, offset } = args;
    
      const params = {
        ...(limit !== undefined && { limit }),
        ...(offset !== undefined && { offset })
      };
    
      return this.api.makeRequest(
        `/browse/categories/${category_id}/playlists${this.api.buildQueryString(params)}`
      );
    }
  • TypeScript interface defining the input arguments for the get_category_playlists tool.
    export interface GetCategoryPlaylistsArgs {
      category_id: string;
      limit?: number;
      offset?: number;
    }
  • src/index.ts:664-688 (registration)
    Tool registration in the ListTools response, defining name, description, and input schema.
    {
      name: 'get_category_playlists',
      description: 'Get a list of Spotify playlists tagged with a particular category',
      inputSchema: {
        type: 'object',
        properties: {
          category_id: {
            type: 'string',
            description: 'The Spotify category ID'
          },
          limit: {
            type: 'number',
            description: 'Optional. Maximum number of playlists (1-50)',
            minimum: 1,
            maximum: 50
          },
          offset: {
            type: 'number',
            description: 'Optional. Index of the first playlist to return',
            minimum: 0
          }
        },
        required: ['category_id']
      },
    }
  • src/index.ts:893-899 (registration)
    Dispatch handler in the CallToolRequest that routes to the playlistsHandler.getCategoryPlaylists method.
    case 'get_category_playlists': {
      const args = this.validateArgs<GetCategoryPlaylistsArgs>(request.params.arguments, ['category_id']);
      const result = await this.playlistsHandler.getCategoryPlaylists(args);
      return {
        content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
      };
    }
Behavior2/5

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

No annotations are provided, so the description carries full burden. It states the action but lacks behavioral details: it doesn't disclose authentication needs, rate limits, pagination behavior (implied by limit/offset but not explained), error handling, or response format. For a read operation with no annotations, this is a significant gap in transparency.

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 front-loads the core purpose without waste. It uses clear language and avoids redundancy, making it easy to parse quickly. Every word earns its place by specifying the action and key constraint.

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 no annotations, no output schema, and 3 parameters, the description is incomplete. It covers the basic purpose but misses critical context: authentication requirements, rate limits, pagination details, error cases, and response structure. For a tool with moderate complexity and no structured support, it should provide more behavioral and usage guidance.

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?

Schema description coverage is 100%, so the schema fully documents all parameters (category_id, limit, offset). The description adds no additional meaning beyond implying category-based filtering. Baseline is 3 as the schema does the heavy lifting, but the description doesn't compensate with extra context like parameter interactions or examples.

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 verb ('Get') and resource ('list of Spotify playlists'), specifying they are 'tagged with a particular category'. It distinguishes from siblings like 'get_featured_playlists' or 'get_current_user_playlists' by focusing on category-based retrieval. However, it doesn't explicitly contrast with all siblings, such as 'search', which might also find playlists by category.

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 prerequisites (e.g., needing a category ID from another source), exclusions, or comparisons to siblings like 'search' for broader playlist discovery. Usage is implied by the name but not explicitly defined.

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