get_user_collection_value
Calculate the minimum, median, and maximum value of a Discogs user's music collection to assess its worth.
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)Full tool object definition, including the 'execute' handler function that implements the core logic for retrieving the minimum, median, and maximum values of a Discogs user's collection using the 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 used by the tool, requiring a non-empty 'username' string.export const UsernameInputSchema = z.object({ username: z.string().min(1, 'username is required'), });
- src/tools/userCollection.ts:334-334 (registration)Specific registration of the getUserCollectionValueTool to the FastMCP server.server.addTool(getUserCollectionValueTool);
- src/tools/userCollection.ts:320-335 (registration)Module-level registration function for user collection tools, which includes adding the get_user_collection_value tool.export function registerUserCollectionTools(server: FastMCP): void { server.addTool(getUserCollectionFoldersTool); server.addTool(createUserCollectionFolderTool); server.addTool(getUserCollectionFolderTool); server.addTool(editUserCollectionFolderTool); server.addTool(deleteUserCollectionFolderTool); server.addTool(findReleaseInUserCollectionTool); server.addTool(getUserCollectionItemsTool); server.addTool(addReleaseToUserCollectionFolderTool); server.addTool(rateReleaseInUserCollectionTool); server.addTool(moveReleaseInUserCollectionTool); server.addTool(deleteReleaseFromUserCollectionFolderTool); server.addTool(getUserCollectionCustomFieldsTool); server.addTool(editUserCollectionCustomFieldValueTool); server.addTool(getUserCollectionValueTool); }
- src/tools/index.ts:20-20 (registration)Top-level tool registration that invokes the user collection tools registration, indirectly registering get_user_collection_value.registerUserCollectionTools(server);