get_user_collection_folders
Retrieve a list of folders in a user's Discogs collection by specifying their username. Simplify management and organization of music catalogs using the Discogs MCP Server.
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 primary handler for the 'get_user_collection_folders' tool. It takes a username, creates a UserService instance, calls userService.collection.getFolders(args), and returns the JSON stringified result or throws formatted error.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)The Zod input schema used by the tool, defining a required 'username' string field.export const UsernameInputSchema = z.object({ username: z.string().min(1, 'username is required'), });
- src/tools/userCollection.ts:320-335 (registration)The registration function for user collection tools, which calls server.addTool(getUserCollectionFoldersTool) to register the tool with the FastMCP server. This function is imported and called from src/tools/index.ts.export function registerUserCollectionTools(server: FastMCP): void { server.addTool(getUserCollectionFoldersTool); server.addTool(createUserCollectionFolderTool); server.addTool(getUserCollectionFolderTool); server.addTool(editUserCollectionFolderTool); server.addTool(deleteUserCollectionFolderTool); server.addTool(findReleaseInUserCollectionTool); server.addTool(getUserCollectionItemsTool); server.addTool(addReleaseToUserCollectionFolderTool); server.addTool(rateReleaseInUserCollectionTool); server.addTool(moveReleaseInUserCollectionTool); server.addTool(deleteReleaseFromUserCollectionFolderTool); server.addTool(getUserCollectionCustomFieldsTool); server.addTool(editUserCollectionCustomFieldValueTool); server.addTool(getUserCollectionValueTool); }