get_user_collection_folders
Retrieve a list of folders from a user's Discogs music collection to organize and manage catalog items.
Instructions
Retrieve a list of folders in a user's collection
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| username | Yes |
Implementation Reference
- src/tools/userCollection.ts:219-233 (handler)The main handler implementation for the 'get_user_collection_folders' MCP tool. Defines the tool object with name, description, input schema, and the execute function that fetches collection folders via UserService.export const getUserCollectionFoldersTool: Tool<FastMCPSessionAuth, typeof UsernameInputSchema> = { name: 'get_user_collection_folders', description: `Retrieve a list of folders in a user's collection`, parameters: UsernameInputSchema, execute: async (args) => { try { const userService = new UserService(); const collectionFolders = await userService.collection.getFolders(args); return JSON.stringify(collectionFolders); } catch (error) { throw formatDiscogsError(error); } }, };
- src/types/common.ts:123-125 (schema)Zod input schema used by the tool, requiring a non-empty 'username' string.export const UsernameInputSchema = z.object({ username: z.string().min(1, 'username is required'), });
- src/tools/userCollection.ts:321-321 (registration)Direct registration of the tool with the FastMCP server instance.server.addTool(getUserCollectionFoldersTool);
- src/tools/index.ts:20-20 (registration)Top-level registration call that includes the user collection tools, encompassing 'get_user_collection_folders'.registerUserCollectionTools(server);