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
| Name | Required | Description | Default |
|---|---|---|---|
| username | Yes |
Implementation Reference
- src/tools/userCollection.ts:260-274 (handler)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); } }, };
- src/types/common.ts:123-125 (schema)Zod input schema for the tool parameters, requiring a 'username' string.export const UsernameInputSchema = z.object({ username: z.string().min(1, 'username is required'), });
- src/tools/userCollection.ts:334-334 (registration)Registration of the 'get_user_collection_value' tool on the FastMCP server.server.addTool(getUserCollectionValueTool);