Skip to main content
Glama
cswkim

Discogs MCP Server

by cswkim

download_inventory_export

Export your inventory data from Discogs API into a CSV file for easy management and analysis. Specify the inventory ID to initiate the download process.

Instructions

Download an inventory export as a CSV

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes

Implementation Reference

  • MCP tool definition including the execute handler that downloads the inventory export CSV using InventoryService.
    export const downloadInventoryExportTool: Tool<FastMCPSessionAuth, typeof InventoryIdParamSchema> = { name: 'download_inventory_export', description: 'Download an inventory export as a CSV', parameters: InventoryIdParamSchema, execute: async (args) => { try { const inventoryService = new InventoryService(); const csv = await inventoryService.downloadExport(args); return csv; } catch (error) { throw formatDiscogsError(error); } }, };
  • Zod schema defining the input parameters for the tool: an object with 'id' as number.
    export const InventoryIdParamSchema = z.object({ id: z.number(), });
  • Registration function that adds the downloadInventoryExportTool (and related tools) to the FastMCP server.
    export function registerInventoryExportTool(server: FastMCP): void { server.addTool(inventoryExportTool); server.addTool(getInventoryExportsTool); server.addTool(getInventoryExportTool); server.addTool(downloadInventoryExportTool); }
  • Top-level call to register the inventory export tools including download_inventory_export.
    registerInventoryExportTool(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