Skip to main content
Glama
cswkim

Discogs MCP Server

by cswkim

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
NameRequiredDescriptionDefault
usernameYes

Implementation Reference

  • 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); } }, };
  • Input schema for the tool: requires a 'username' string parameter.
    export const UsernameInputSchema = z.object({ username: z.string().min(1, 'username is required'), });
  • 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); }
  • Top-level registration call to registerUserIdentityTools within the overall tools registration.
    registerUserIdentityTools(server);

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/cswkim/discogs-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server