Skip to main content
Glama

get_multiple_artists

Retrieve Spotify catalog details for up to 50 artists simultaneously using their IDs or URIs.

Instructions

Get Spotify catalog information for multiple artists

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idsYesArray of Spotify artist IDs or URIs (max 50)

Implementation Reference

  • Executes the tool logic: validates input (1-50 artist IDs), extracts IDs, calls Spotify API /artists?ids=... endpoint.
    async getMultipleArtists(args: MultipleArtistsArgs) { if (args.ids.length === 0) { throw new McpError( ErrorCode.InvalidParams, 'At least one artist ID must be provided' ); } if (args.ids.length > 50) { throw new McpError( ErrorCode.InvalidParams, 'Maximum of 50 artist IDs allowed' ); } const artistIds = args.ids.map(this.extractArtistId); return this.api.makeRequest(`/artists?ids=${artistIds.join(',')}`); }
  • TypeScript interface defining the input arguments: array of artist IDs or URIs.
    export interface MultipleArtistsArgs { ids: string[]; }
  • src/index.ts:155-170 (registration)
    Registers the tool in ListToolsResponse: name, description, and JSON input schema.
    { name: 'get_multiple_artists', description: 'Get Spotify catalog information for multiple artists', inputSchema: { type: 'object', properties: { ids: { type: 'array', items: { type: 'string' }, description: 'Array of Spotify artist IDs or URIs (max 50)', maxItems: 50 } }, required: ['ids'] }, },
  • src/index.ts:718-724 (registration)
    Handles CallToolRequest: validates args, calls artistsHandler.getMultipleArtists, returns JSON result.
    case 'get_multiple_artists': { const args = this.validateArgs<MultipleArtistsArgs>(request.params.arguments, ['ids']); const result = await this.artistsHandler.getMultipleArtists(args); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }], }; }
  • Helper method to normalize artist IDs from Spotify URI to plain ID, used in getMultipleArtists.
    private extractArtistId(id: string): string { return id.startsWith('spotify:artist:') ? id.split(':')[2] : id; }

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