Skip to main content
Glama
cswkim

Discogs MCP Server

by cswkim

get_user_collection_value

Retrieves the minimum, median, and maximum value of a user's Discogs music collection by analyzing their catalog based on the provided username.

Instructions

Returns the minimum, median, and maximum value of a user's collection

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
usernameYes

Implementation Reference

  • MCP tool definition including the handler (execute function) that fetches the min, median, and max value of a Discogs user's collection using UserService.
    export const getUserCollectionValueTool: Tool<FastMCPSessionAuth, typeof UsernameInputSchema> = { name: 'get_user_collection_value', description: `Returns the minimum, median, and maximum value of a user's collection`, parameters: UsernameInputSchema, execute: async (args) => { try { const userService = new UserService(); const collectionValue = await userService.collection.getValue(args); return JSON.stringify(collectionValue); } catch (error) { throw formatDiscogsError(error); } }, };
  • Zod input schema for the tool parameters, requiring a 'username' string.
    export const UsernameInputSchema = z.object({ username: z.string().min(1, 'username is required'), });
  • Registration of the 'get_user_collection_value' tool on the FastMCP server.
    server.addTool(getUserCollectionValueTool);

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