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
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes |
Implementation Reference
- src/tools/inventoryExport.ts:11-26 (handler)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); } }, };
- src/types/inventory.ts:5-7 (schema)Zod schema defining the input parameters for the tool: an object with 'id' as number.export const InventoryIdParamSchema = z.object({ id: z.number(), });
- src/tools/inventoryExport.ts:85-90 (registration)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); }
- src/tools/index.ts:18-18 (registration)Top-level call to register the inventory export tools including download_inventory_export.registerInventoryExportTool(server);