edit_user_collection_folder
Modify folder metadata in your Discogs music collection. Update folder names and manage organization for your music catalog.
Instructions
Edit a folder's metadata. Folders 0 and 1 cannot be renamed.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| username | Yes | ||
| name | No | ||
| folder_id | Yes |
Implementation Reference
- src/tools/userCollection.ts:131-148 (handler)The primary handler for the 'edit_user_collection_folder' tool. It instantiates UserService and calls editFolder on the collection submodule with the provided arguments, returning the updated folder as JSON.export const editUserCollectionFolderTool: Tool< FastMCPSessionAuth, typeof UserCollectionFolderEditParamsSchema > = { name: 'edit_user_collection_folder', description: `Edit a folder's metadata. Folders 0 and 1 cannot be renamed.`, parameters: UserCollectionFolderEditParamsSchema, execute: async (args) => { try { const userService = new UserService(); const folder = await userService.collection.editFolder(args); return JSON.stringify(folder); } catch (error) { throw formatDiscogsError(error); } }, };
- src/types/user/collection.ts:70-71 (schema)Zod schema defining the input parameters: username, folder_id (integer >=0), and optional name for the folder.export const UserCollectionFolderEditParamsSchema = UserCollectionFolderCreateParamsSchema.merge(FolderIdParamSchema());
- src/tools/userCollection.ts:324-324 (registration)Registration of the tool within the registerUserCollectionTools function.server.addTool(editUserCollectionFolderTool);
- src/tools/index.ts:20-20 (registration)Top-level registration call that includes the user collection tools module.registerUserCollectionTools(server);