Skip to main content
Glama
cswkim

Discogs MCP Server

by cswkim

inventory_export

Export your Discogs inventory as a CSV file for easy management and analysis of your music collection directly through the Discogs API.

Instructions

Request an export of your inventory as a CSV

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler (execute function) for the 'inventory_export' MCP tool. It instantiates InventoryService and calls its export() method to request a CSV export of the user's inventory.
    export const inventoryExportTool: Tool<FastMCPSessionAuth, ToolParameters> = { name: 'inventory_export', description: 'Request an export of your inventory as a CSV', parameters: z.object({}), execute: async () => { try { const inventoryService = new InventoryService(); await inventoryService.export(); return 'Inventory export requested'; } catch (error) { throw formatDiscogsError(error); } },
  • Registration function that adds the 'inventory_export' tool (along with related tools) to the FastMCP server.
    export function registerInventoryExportTool(server: FastMCP): void { server.addTool(inventoryExportTool); server.addTool(getInventoryExportsTool); server.addTool(getInventoryExportTool); server.addTool(downloadInventoryExportTool); }
  • Invocation of the registration function for inventory export tools within the main registerTools function.
    registerInventoryExportTool(server);
  • Supporting helper method in InventoryService that sends the POST request to '/inventory/export' to initiate the inventory export.
    async export(): Promise<void> { try { await this.request<void>('/export', { method: 'POST', }); } catch (error) { if (isDiscogsError(error)) { throw error; } throw new Error(`Failed to export inventory: ${String(error)}`); }

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