Skip to main content
Glama
cswkim

Discogs MCP Server

by cswkim

search

Query the Discogs database to find artists, labels, releases, or masters using specific filters like title, genre, year, or format. Retrieve detailed results for music catalog management.

Instructions

Issue a search query to the Discogs database

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
anvNo
artistNo
barcodeNo
catnoNo
contributorNo
countryNo
creditNo
formatNo
genreNo
labelNo
pageNo
per_pageNo
qNo
release_titleNo
sortNo
sort_orderNo
styleNo
submitterNo
titleNo
trackNo
typeNo
yearNo

Implementation Reference

  • The 'search' tool handler, which creates a DatabaseService instance and calls its search method with the input arguments, returning the JSON-stringified results.
    export const searchTool: Tool<FastMCPSessionAuth, typeof SearchParamsSchema> = { name: 'search', description: 'Issue a search query to the Discogs database', parameters: SearchParamsSchema, execute: async (args) => { try { const databaseService = new DatabaseService(); const searchResults = await databaseService.search(args); return JSON.stringify(searchResults); } catch (error) { throw formatDiscogsError(error); } }, };
  • Zod schema defining the input parameters for the 'search' tool, including query fields like q, type, title, etc., merged with common query params.
    export const SearchParamsSchema = z .object({ q: z.string().optional(), type: z.enum(['artist', 'label', 'master', 'release']).optional(), title: z.string().optional(), release_title: z.string().optional(), credit: z.string().optional(), artist: z.string().optional(), anv: z.string().optional(), label: z.string().optional(), genre: z.string().optional(), style: z.string().optional(), country: z.string().optional(), year: z.string().optional(), format: z.string().optional(), catno: z.string().optional(), barcode: z.string().optional(), track: z.string().optional(), submitter: z.string().optional(), contributor: z.string().optional(), }) .merge(QueryParamsSchema(['title', 'artist', 'year']));
  • Registration of the 'search' tool to the FastMCP server in the registerDatabaseTools function.
    server.addTool(searchTool);

Other Tools

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

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