Skip to main content
Glama
cswkim

Discogs MCP Server

by cswkim

download_inventory_export

Download your Discogs inventory data as a CSV file for analysis or backup purposes.

Instructions

Download an inventory export as a CSV

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes

Implementation Reference

  • Defines the MCP Tool object for 'download_inventory_export', including the execute handler function that instantiates InventoryService and calls downloadExport to retrieve the CSV.
    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 for input parameters: object with required 'id' field of type number.
    export const InventoryIdParamSchema = z.object({
      id: z.number(),
    });
  • Function that registers the downloadInventoryExportTool to the FastMCP server instance (along with related inventory tools). This function is imported and called in src/tools/index.ts.
    export function registerInventoryExportTool(server: FastMCP): void {
      server.addTool(inventoryExportTool);
      server.addTool(getInventoryExportsTool);
      server.addTool(getInventoryExportTool);
      server.addTool(downloadInventoryExportTool);
    }
  • The core helper method in InventoryService that makes the HTTP request to Discogs API endpoint '/inventory/export/{id}/download' to fetch the CSV content.
    async downloadExport({ id }: InventoryIdParam): Promise<string> {
      try {
        const response = await this.request<string>(`/export/${id}/download`);
        return response;
      } catch (error) {
        if (isDiscogsError(error)) {
          throw error;
        }
        throw new Error(`Failed to download inventory export: ${String(error)}`);
      }
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the action ('Download') but doesn't clarify if this is a read-only operation, requires authentication, involves file handling or storage implications, or has rate limits. For a download tool with zero annotation coverage, this leaves significant gaps in understanding its behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core action and output format. There is no wasted verbiage, making it easy to parse quickly while conveying essential information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (a download operation with 1 parameter), lack of annotations, 0% schema coverage, and no output schema, the description is incomplete. It doesn't address key aspects like parameter meaning, behavioral traits (e.g., file handling), or output details (e.g., CSV format specifics), leaving the agent with insufficient context for reliable use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate for the undocumented parameter 'id'. The description mentions 'an inventory export' but doesn't explain what 'id' represents (e.g., export identifier, job ID) or where to obtain it. This adds minimal value beyond the schema's structural definition.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Download') and resource ('an inventory export as a CSV'), making the tool's purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'get_inventory_export' or 'inventory_export', which might have overlapping functionality, so it doesn't achieve full distinction.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives. For example, it doesn't specify if this is for retrieving a previously generated export (implied by the 'id' parameter) or how it differs from 'get_inventory_export' or 'inventory_export' in the sibling list. The description lacks context for selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other 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