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
| Name | Required | Description | Default |
|---|---|---|---|
| label_id | Yes |
Implementation Reference
- src/tools/database.ts:100-114 (handler)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); } }, };
- src/types/label.ts:9-11 (schema)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(), });
- src/tools/database.ts:263-263 (registration)Registers the getLabelTool (named 'get_label') with the FastMCP server instance.server.addTool(getLabelTool);