Skip to main content
Glama
cswkim

Discogs MCP Server

by cswkim

get_artist

Retrieve detailed artist information from the Discogs music database by providing a specific artist ID for catalog management and research.

Instructions

Get an artist

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
artist_idYes

Implementation Reference

  • Defines the MCP 'get_artist' tool, including its handler (execute function) that fetches artist data using ArtistService.get(args) and returns JSON.
    export const getArtistTool: Tool<FastMCPSessionAuth, typeof ArtistIdParamSchema> = { name: 'get_artist', description: 'Get an artist', parameters: ArtistIdParamSchema, execute: async (args) => { try { const artistService = new ArtistService(); const artist = await artistService.get(args); return JSON.stringify(artist); } catch (error) { throw formatDiscogsError(error); } }, };
  • Input schema (Zod) for the 'get_artist' tool, requiring an artist_id number.
    export const ArtistIdParamSchema = z.object({ artist_id: z.number(), });
  • Registers the 'get_artist' tool on the MCP server within registerDatabaseTools.
    server.addTool(getArtistTool);
  • Top-level tool registration function that invokes registerDatabaseTools, indirectly registering 'get_artist'.
    export function registerTools(server: FastMCP): void { registerDatabaseTools(server); registerMarketplaceTools(server); registerInventoryExportTool(server); registerUserIdentityTools(server); registerUserCollectionTools(server); registerUserWantlistTools(server); registerUserListsTools(server); registerMediaTools(server); }

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/cswkim/discogs-mcp-server'

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