add_to_wantlist
Add music releases to your Discogs wantlist by specifying username and release ID. Track desired vinyl, CDs, or cassettes for future purchase.
Instructions
Add a release to 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:29-43 (handler)Tool handler implementation: defines the 'add_to_wantlist' tool with execute function that instantiates UserService and calls wants.addItem(args) to add the release 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:28-36 (schema)Zod schema defining input parameters for add_to_wantlist: merges username input with release ID and optional notes/rating./** * Schema for adding or editing a release in a user's wantlist */ 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)Registration function that adds the addToWantlistTool (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); }
- src/tools/index.ts:21-21 (registration)Invocation of registerUserWantlistTools in the main tools registration, ensuring the tool is registered on the server.registerUserWantlistTools(server);