Skip to main content
Glama
cswkim

Discogs MCP Server

by cswkim

get_user_collection_items

Retrieve and manage items from a user's Discogs collection by specifying the username, folder ID, and sorting preferences. Use this tool to organize and access music catalog data efficiently.

Instructions

Retrieve a list of items in a user's collection

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
folder_idYes
pageNo
per_pageNo
sortNo
sort_orderNo
usernameYes

Implementation Reference

  • MCP tool object defining the 'get_user_collection_items' handler, including name, description, parameters schema, and execute function that calls UserService.collection.getItems to fetch the collection items.
    export const getUserCollectionItemsTool: Tool< FastMCPSessionAuth, typeof UserCollectionItemsParamsSchema > = { name: 'get_user_collection_items', description: `Retrieve a list of items in a user's collection`, parameters: UserCollectionItemsParamsSchema, execute: async (args) => { try { const userService = new UserService(); const items = await userService.collection.getItems(args); return JSON.stringify(items); } catch (error) { throw formatDiscogsError(error); } }, };
  • Zod schema defining the input parameters for the tool: merges username, optional folder_id, and query parameters for filtering collection items.
    export const UserCollectionItemsParamsSchema = UsernameInputSchema.merge( FolderIdParamSchema().merge( QueryParamsSchema([ 'added', 'artist', 'catno', 'format', 'label', 'rating', 'title', 'year', ] as const), ), );
  • Registration of the getUserCollectionItemsTool with the FastMCP server instance.
    server.addTool(getUserCollectionItemsTool);
  • Invocation of registerUserCollectionTools which includes adding the get_user_collection_items tool to the server.
    registerUserCollectionTools(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