get_user_wantlist
Retrieve a user's Discogs wantlist, including releases sorted by criteria like artist, title, or year. Specify username, page, and sort options to manage and view collection preferences.
Instructions
Returns the list of releases in a user's wantlist
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | ||
| per_page | No | ||
| sort | No | ||
| sort_order | No | ||
| username | Yes |
Implementation Reference
- src/tools/userWantlist.ts:10-24 (handler)Defines the get_user_wantlist tool object, including the execute handler function that uses UserService to retrieve the wantlist and returns it as JSON string.export const getUserWantlistTool: Tool<FastMCPSessionAuth, typeof UserWantlistParamsSchema> = { name: 'get_user_wantlist', description: `Returns the list of releases in a user's wantlist`, parameters: UserWantlistParamsSchema, execute: async (args) => { try { const userService = new UserService(); const wantlist = await userService.wants.getList(args); return JSON.stringify(wantlist); } catch (error) { throw formatDiscogsError(error); } }, };
- src/types/user/wants.ts:8-10 (schema)Zod schema for the input parameters of the get_user_wantlist tool, combining username input and query parameters.export const UserWantlistParamsSchema = UsernameInputSchema.merge( QueryParamsSchema(['added', 'artist', 'label', 'rating', 'title', 'year'] as const), );
- src/tools/userWantlist.ts:87-92 (registration)Function that directly registers the get_user_wantlist tool by calling server.addTool(getUserWantlistTool).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 invokes registerUserWantlistTools, thereby registering the get_user_wantlist tool.export function registerTools(server: FastMCP): void { registerDatabaseTools(server); registerMarketplaceTools(server); registerInventoryExportTool(server); registerUserIdentityTools(server); registerUserCollectionTools(server); registerUserWantlistTools(server); registerUserListsTools(server); registerMediaTools(server); }