add_to_wantlist
Add a music release to a specified user's Discogs wantlist by providing the username, release ID, optional notes, and a rating. Manage music catalog preferences efficiently.
Instructions
Add a release to a user's wantlist
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| notes | No | ||
| rating | No | ||
| release_id | Yes | ||
| username | Yes |
Implementation Reference
- src/tools/userWantlist.ts:29-43 (handler)The complete tool implementation for 'add_to_wantlist', defining the name, description, input schema, and the execute handler that uses UserService to add the item to the wantlist.export const addToWantlistTool: Tool<FastMCPSessionAuth, typeof UserWantlistItemParamsSchema> = { name: 'add_to_wantlist', description: `Add a release to a user's wantlist`, parameters: UserWantlistItemParamsSchema, execute: async (args) => { try { const userService = new UserService(); const wantlistItem = await userService.wants.addItem(args); return JSON.stringify(wantlistItem); } catch (error) { throw formatDiscogsError(error); } }, };
- src/types/user/wants.ts:31-36 (schema)Zod schema for the input parameters of the add_to_wantlist tool, merging username input with release ID and optional notes/rating.export 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)Modular registration function that adds the addToWantlistTool (among others) to the FastMCP server.export function registerUserWantlistTools(server: FastMCP): void { server.addTool(getUserWantlistTool); server.addTool(addToWantlistTool); server.addTool(editItemInWantlistTool); server.addTool(deleteItemInWantlistTool); }
- src/tools/index.ts:15-24 (registration)Top-level tool registration function that calls registerUserWantlistTools to register the wantlist tools including 'add_to_wantlist'.export function registerTools(server: FastMCP): void { registerDatabaseTools(server); registerMarketplaceTools(server); registerInventoryExportTool(server); registerUserIdentityTools(server); registerUserCollectionTools(server); registerUserWantlistTools(server); registerUserListsTools(server); registerMediaTools(server); }