get_user_profile
Retrieve user profiles from Discogs by username to access collection details and music preferences.
Instructions
Retrieve a user by username
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| username | Yes |
Implementation Reference
- src/tools/userIdentity.ts:33-47 (handler)The tool definition and handler (execute function) for 'get_user_profile', which retrieves a Discogs user profile by username using UserService.export const getUserProfileTool: Tool<FastMCPSessionAuth, typeof UsernameInputSchema> = { name: 'get_user_profile', description: 'Retrieve a user by username', parameters: UsernameInputSchema, execute: async (args) => { try { const userService = new UserService(); const profile = await userService.profile.get(args); return JSON.stringify(profile); } catch (error) { throw formatDiscogsError(error); } }, };
- src/types/common.ts:123-125 (schema)Zod input schema for the 'get_user_profile' tool, defining the required 'username' parameter.export const UsernameInputSchema = z.object({ username: z.string().min(1, 'username is required'), });
- src/tools/userIdentity.ts:109-109 (registration)Direct registration of the getUserProfileTool in the registerUserIdentityTools function.server.addTool(getUserProfileTool);
- src/tools/index.ts:19-19 (registration)Invocation of registerUserIdentityTools which registers the get_user_profile tool among others.registerUserIdentityTools(server);
- src/index.ts:32-32 (registration)Top-level registration call that ultimately registers all tools including get_user_profile.registerTools(server);