rate_release_in_user_collection
Assign a rating (1-5) to a specific music release in a user's Discogs collection folder, ensuring proper identification via username, folder ID, release ID, and instance ID.
Instructions
Rate a release in a user's collection. The folder_id must be non-zero.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| folder_id | Yes | ||
| instance_id | Yes | ||
| rating | No | ||
| release_id | Yes | ||
| username | Yes |
Implementation Reference
- src/tools/userCollection.ts:301-318 (handler)The tool handler: defines the tool with name, description, parameters schema, and execute function that instantiates UserService and calls collection.rateRelease(args).export const rateReleaseInUserCollectionTool: Tool< FastMCPSessionAuth, typeof UserCollectionReleaseRatingParamsSchema > = { name: 'rate_release_in_user_collection', description: `Rate a release in a user's collection. The folder_id must be non-zero.`, parameters: UserCollectionReleaseRatingParamsSchema, execute: async (args) => { try { const userService = new UserService(); await userService.collection.rateRelease(args); return 'Release rated successfully'; } catch (error) { throw formatDiscogsError(error); } }, };
- src/types/user/collection.ts:149-152 (schema)Input parameters schema for rating a release: username, folder_id (>=1), release_id, instance_id, optional rating (1-5). Builds on other schemas for folder/release params.export const UserCollectionReleaseRatingParamsSchema = UserCollectionReleaseDeletedParamsSchema.extend({ rating: z.number().int().min(1).max(5).optional(), });
- src/tools/userCollection.ts:320-335 (registration)Function to register all user collection tools to the FastMCP server, including server.addTool(rateReleaseInUserCollectionTool);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); }