Skip to main content
Glama
cswkim

Discogs MCP Server

by cswkim

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
NameRequiredDescriptionDefault
usernameYes
release_idYes
notesNo
ratingNo

Implementation Reference

  • MCP tool object for 'delete_item_in_wantlist' including the handler execute function that delegates to UserService.wants.deleteItem
    export 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); } }, };
  • Zod schema defining input parameters for the tool: username, release_id, optional notes and rating
    export const UserWantlistItemParamsSchema = UsernameInputSchema.merge( ReleaseIdParamSchema.extend({ notes: z.string().optional(), rating: z.number().int().min(0).max(5).optional(), }), );
  • Registration function that adds the delete_item_in_wantlist tool (and related wantlist tools) to the FastMCP server
    export function registerUserWantlistTools(server: FastMCP): void { server.addTool(getUserWantlistTool); server.addTool(addToWantlistTool); server.addTool(editItemInWantlistTool); server.addTool(deleteItemInWantlistTool); }
  • Invocation of registerUserWantlistTools in the main registerTools function, which registers all tools including delete_item_in_wantlist
    registerUserWantlistTools(server);
  • UserWantsService.deleteItem method that performs the actual Discogs API DELETE request to remove the release from the wantlist
    async 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)}`); } }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/cswkim/discogs-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server