Skip to main content
Glama
superseoworld

MCP Spotify Server

get_artist_related_artists

Find artists similar to a given artist using Spotify's catalog data to discover new music and expand your listening preferences.

Instructions

Get Spotify catalog information about artists similar to a given artist

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesThe Spotify ID or URI for the artist

Implementation Reference

  • The core handler function for the 'get_artist_related_artists' tool. It extracts the Spotify artist ID from the provided arguments and calls the Spotify API endpoint `/artists/{id}/related-artists` to fetch related artists.
    async getArtistRelatedArtists(args: ArtistRelatedArtistsArgs) {
      const artistId = this.extractArtistId(args.id);
      return this.api.makeRequest(`/artists/${artistId}/related-artists`);
    }
  • TypeScript interface definitions for the tool's input arguments. ArtistRelatedArtistsArgs extends ArtistArgs, which requires a single 'id' string (Spotify artist ID or URI).
    export interface ArtistArgs {
      id: string;
    }
    
    export interface ArtistTopTracksArgs extends ArtistArgs, MarketParams {}
    
    export interface ArtistRelatedArtistsArgs extends ArtistArgs {}
  • src/index.ts:189-202 (registration)
    Tool registration in the MCP server's listTools handler, including name, description, and input schema validation.
    {
      name: 'get_artist_related_artists',
      description: 'Get Spotify catalog information about artists similar to a given artist',
      inputSchema: {
        type: 'object',
        properties: {
          id: {
            type: 'string',
            description: 'The Spotify ID or URI for the artist'
          }
        },
        required: ['id']
      },
    },
  • src/index.ts:734-740 (registration)
    Dispatch logic in the MCP server's callTool handler that validates arguments and delegates to the ArtistsHandler's getArtistRelatedArtists method.
    case 'get_artist_related_artists': {
      const args = this.validateArgs<ArtistRelatedArtistsArgs>(request.params.arguments, ['id']);
      const result = await this.artistsHandler.getArtistRelatedArtists(args);
      return {
        content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
      };
    }
  • Helper method used by the handler to normalize Spotify artist IDs or URIs to plain IDs.
    private extractArtistId(id: string): string {
      return id.startsWith('spotify:artist:') ? id.split(':')[2] : id;
    }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions retrieving 'Spotify catalog information' but does not specify details like rate limits, authentication requirements, response format, or whether it's a read-only operation. This leaves significant gaps in understanding how the tool behaves in practice.

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 wasted words. It is front-loaded and appropriately sized for a simple tool, making it easy to understand at a glance.

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

Completeness3/5

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

Given the tool's simplicity (one parameter, no output schema, no annotations), the description is minimally adequate but lacks completeness. It does not explain what the output contains (e.g., list of artists, similarity scores) or address potential errors, which could hinder effective use by an AI agent despite the straightforward input.

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 input schema has 100% description coverage, with the 'id' parameter clearly documented as 'The Spotify ID or URI for the artist'. The description adds no additional meaning beyond this, such as examples or constraints, so it meets the baseline score for high schema coverage without compensating 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 Spotify catalog information') and the resource ('artists similar to a given artist'), making the purpose evident. However, it does not explicitly differentiate this tool from sibling tools like 'get_artist' or 'get_multiple_artists', which might also retrieve artist information but for different purposes, so it falls short of a perfect score.

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_artist' for basic artist details or 'get_recommendations' for broader recommendations. It lacks explicit context, prerequisites, or exclusions, leaving usage unclear beyond the basic purpose.

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