get_user_lists
Retrieve a user's Discogs lists by username to view and manage their music collections, with options to paginate results and sort order.
Instructions
Get a user's lists
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| username | Yes | ||
| page | No | ||
| per_page | No | ||
| sort | No | ||
| sort_order | No |
Implementation Reference
- src/tools/userLists.ts:12-26 (handler)The handler implementation for the 'get_user_lists' tool, which creates a UserService instance and calls userService.lists.get(args) to fetch the lists.export const getUserListsTool: Tool<FastMCPSessionAuth, typeof UserListsParamsSchema> = { name: 'get_user_lists', description: `Get a user's lists`, parameters: UserListsParamsSchema, execute: async (args) => { try { const userService = new UserService(); const lists = await userService.lists.get(args); return JSON.stringify(lists); } catch (error) { throw formatDiscogsError(error); } }, };
- src/types/user/lists.ts:21-21 (schema)Input schema (UserListsParamsSchema) used by the get_user_lists tool for parameter validation.export const UserListsParamsSchema = UsernameInputSchema.merge(QueryParamsSchema());
- src/tools/userLists.ts:47-50 (registration)Registration function that adds the getUserListsTool to the MCP server.export function registerUserListsTools(server: FastMCP): void { server.addTool(getUserListsTool); server.addTool(getListTool); }
- src/tools/index.ts:15-24 (registration)Top-level registration where registerUserListsTools is called to register the tool.export function registerTools(server: FastMCP): void { registerDatabaseTools(server); registerMarketplaceTools(server); registerInventoryExportTool(server); registerUserIdentityTools(server); registerUserCollectionTools(server); registerUserWantlistTools(server); registerUserListsTools(server); registerMediaTools(server); }