delete_item_in_wantlist
Remove a music release from a Discogs user's wantlist by specifying the username and release ID.
Instructions
Delete a release from a user's wantlist
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| username | Yes | ||
| release_id | Yes | ||
| notes | No | ||
| rating | No |
Implementation Reference
- src/tools/userWantlist.ts:68-85 (handler)MCP tool object for 'delete_item_in_wantlist' including the handler execute function that delegates to UserService.wants.deleteItemexport const deleteItemInWantlistTool: Tool< FastMCPSessionAuth, typeof UserWantlistItemParamsSchema > = { name: 'delete_item_in_wantlist', description: `Delete a release from a user's wantlist`, parameters: UserWantlistItemParamsSchema, execute: async (args) => { try { const userService = new UserService(); await userService.wants.deleteItem(args); return 'Release deleted from wantlist'; } catch (error) { throw formatDiscogsError(error); } }, };
- src/types/user/wants.ts:31-36 (schema)Zod schema defining input parameters for the tool: username, release_id, optional notes and ratingexport const UserWantlistItemParamsSchema = UsernameInputSchema.merge( ReleaseIdParamSchema.extend({ notes: z.string().optional(), rating: z.number().int().min(0).max(5).optional(), }), );
- src/tools/userWantlist.ts:87-92 (registration)Registration function that adds the delete_item_in_wantlist tool (and related wantlist tools) to the FastMCP serverexport function registerUserWantlistTools(server: FastMCP): void { server.addTool(getUserWantlistTool); server.addTool(addToWantlistTool); server.addTool(editItemInWantlistTool); server.addTool(deleteItemInWantlistTool); }
- src/tools/index.ts:21-21 (registration)Invocation of registerUserWantlistTools in the main registerTools function, which registers all tools including delete_item_in_wantlistregisterUserWantlistTools(server);
- src/services/user/wants.ts:125-139 (helper)UserWantsService.deleteItem method that performs the actual Discogs API DELETE request to remove the release from the wantlistasync deleteItem({ username, release_id }: UserWantlistItemParams): Promise<void> { try { await this.request(`/${username}/wants/${release_id}`, { method: 'DELETE', }); } catch (error) { // If it's already a Discogs error, just rethrow it if (isDiscogsError(error)) { throw error; } // For other unexpected errors, wrap them throw new Error(`Failed to delete from wantlist: ${String(error)}`); } }