Skip to main content
Glama
cswkim

Discogs MCP Server

by cswkim

get_label

Retrieve detailed information about a music label by providing its unique ID, using the Discogs API for accurate catalog data and streamlined collection management.

Instructions

Get a label

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
label_idYes

Implementation Reference

  • The handler implementation for the 'get_label' tool. It creates a LabelService instance and calls its get method with the provided arguments, returning the JSON-stringified label data or throwing a formatted error.
    export const getLabelTool: Tool<FastMCPSessionAuth, typeof LabelIdParamSchema> = { name: 'get_label', description: 'Get a label', parameters: LabelIdParamSchema, execute: async (args) => { try { const labelService = new LabelService(); const label = await labelService.get(args); return JSON.stringify(label); } catch (error) { throw formatDiscogsError(error); } }, };
  • Zod schema defining the input parameters for the 'get_label' tool, which requires a numeric 'label_id'.
    export const LabelIdParamSchema = z.object({ label_id: z.number(), });
  • Registers the getLabelTool (named 'get_label') with the FastMCP server instance.
    server.addTool(getLabelTool);

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