get_user_profile
Retrieve a user's profile by providing the username, enabling access to detailed information from the Discogs API for music catalog operations.
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 getUserProfileTool object definition, including the 'execute' handler function that implements the core logic: instantiates UserService and calls profile.get(args) to fetch the user profile by username, then returns it as JSON string.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)Input schema for the tool: requires a 'username' string parameter.export const UsernameInputSchema = z.object({ username: z.string().min(1, 'username is required'), });
- src/tools/userIdentity.ts:107-113 (registration)Module-level registration function that adds the getUserProfileTool (and related tools) to the FastMCP server instance.export function registerUserIdentityTools(server: FastMCP): void { server.addTool(getUserIdentityTool); server.addTool(getUserProfileTool); server.addTool(editUserProfileTool); server.addTool(getUserSubmissionsTool); server.addTool(getUserContributionsTool); }
- src/tools/index.ts:19-19 (registration)Top-level registration call to registerUserIdentityTools within the overall tools registration.registerUserIdentityTools(server);