get_user_lists
Retrieve a user's lists from Discogs by specifying the username, page, and per-page parameters. Useful for managing and organizing Discogs collections efficiently.
Instructions
Get a user's lists
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | ||
| per_page | No | ||
| sort | No | ||
| sort_order | No | ||
| username | Yes |
Implementation Reference
- src/tools/userLists.ts:12-26 (handler)Defines the 'get_user_lists' MCP tool, including name, description, input schema reference, and the execute handler function that uses UserService to fetch and return the user's 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)Zod schema defining the input parameters for the get_user_lists tool (username and optional query parameters like page, per_page).export const UserListsParamsSchema = UsernameInputSchema.merge(QueryParamsSchema());
- src/tools/userLists.ts:47-50 (registration)Registration function that adds the get_user_lists tool (and get_list tool) to the FastMCP server.export function registerUserListsTools(server: FastMCP): void { server.addTool(getUserListsTool); server.addTool(getListTool); }
- src/tools/index.ts:22-22 (registration)Top-level call to register user lists tools, including get_user_lists, during overall tools registration.registerUserListsTools(server);