get_label_releases
Retrieve a list of music releases associated with a specific label from the Discogs API. Specify label ID, page, items per page, sorting, and order to organize results efficiently.
Instructions
Returns a list of Releases associated with the label
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| label_id | Yes | ||
| page | No | ||
| per_page | No | ||
| sort | No | ||
| sort_order | No |
Implementation Reference
- src/tools/database.ts:119-133 (handler)The handler function for the 'get_label_releases' tool. It creates a LabelService instance and calls getReleases(args) to fetch the label's releases, returning them as JSON.export const getLabelReleasesTool: Tool<FastMCPSessionAuth, typeof LabelReleasesParamsSchema> = { name: 'get_label_releases', description: 'Returns a list of Releases associated with the label', parameters: LabelReleasesParamsSchema, execute: async (args) => { try { const labelService = new LabelService(); const labelReleases = await labelService.getReleases(args); return JSON.stringify(labelReleases); } catch (error) { throw formatDiscogsError(error); } }, };
- src/types/label.ts:60-60 (schema)Zod schema for the input parameters of get_label_releases tool, merging LabelIdParamSchema (label_id: number) with QueryParamsSchema (likely pagination, etc.).export const LabelReleasesParamsSchema = LabelIdParamSchema.merge(QueryParamsSchema());
- src/tools/database.ts:253-266 (registration)Registration function for database tools, which adds the getLabelReleasesTool (get_label_releases) to the FastMCP server.export function registerDatabaseTools(server: FastMCP): void { server.addTool(getReleaseTool); server.addTool(getReleaseRatingTool); server.addTool(editReleaseRatingTool); server.addTool(deleteReleaseRatingTool); server.addTool(getReleaseCommunityRatingTool); server.addTool(getMasterReleaseTool); server.addTool(getMasterReleaseVersionsTool); server.addTool(getArtistTool); server.addTool(getArtistReleasesTool); server.addTool(getLabelTool); server.addTool(getLabelReleasesTool); server.addTool(searchTool); }
- src/types/label.ts:9-11 (schema)Base schema for label_id parameter used in LabelReleasesParamsSchema.export const LabelIdParamSchema = z.object({ label_id: z.number(), });