Skip to main content
Glama
cswkim

Discogs MCP Server

by cswkim

get_inventory_exports

Retrieve recent exports of your Discogs inventory to track and manage your music collection data.

Instructions

Get a list of all recent exports of your inventory

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Tool definition including the handler (execute function) for 'get_inventory_exports', which calls InventoryService.getExports() and returns JSON stringified response.
    export const getInventoryExportsTool: Tool<FastMCPSessionAuth, ToolParameters> = {
      name: 'get_inventory_exports',
      description: 'Get a list of all recent exports of your inventory',
      parameters: z.object({}),
      execute: async () => {
        try {
          const inventoryService = new InventoryService();
          const exports = await inventoryService.getExports();
    
          return JSON.stringify(exports);
        } catch (error) {
          throw formatDiscogsError(error);
        }
      },
    };
  • Registers the getInventoryExportsTool on the FastMCP server instance.
    export function registerInventoryExportTool(server: FastMCP): void {
      server.addTool(inventoryExportTool);
      server.addTool(getInventoryExportsTool);
      server.addTool(getInventoryExportTool);
      server.addTool(downloadInventoryExportTool);
    }
  • Core helper method in InventoryService that fetches inventory exports from Discogs API endpoint '/inventory/export' and validates with schema.
    async getExports(): Promise<InventoryExportsResponse> {
      try {
        const response = await this.request<InventoryExportsResponse>('/export');
    
        const validatedResponse = InventoryExportsResponseSchema.parse(response);
        return validatedResponse;
      } catch (error) {
        if (isDiscogsError(error)) {
          throw error;
        }
        throw new Error(`Failed to get inventory exports: ${String(error)}`);
      }
    }
  • Zod schemas for InventoryExportItem and InventoryExportsResponse used to validate the API response in the helper.
    export const InventoryExportItemSchema = z.object({
      status: z.string(),
      created_ts: z.string().nullable(),
      url: urlOrEmptySchema(),
      finished_ts: z.string().nullable(),
      download_url: urlOrEmptySchema(),
      filename: z.string(),
      id: z.number(),
    });
    
    export const InventoryExportsResponseSchema = PaginatedResponseSchema(
      InventoryExportItemSchema,
      'items',
    );
  • Top-level registration function that calls registerInventoryExportTool to add the tool to the server.
    export function registerTools(server: FastMCP): void {
      registerDatabaseTools(server);
      registerMarketplaceTools(server);
      registerInventoryExportTool(server);
      registerUserIdentityTools(server);
      registerUserCollectionTools(server);
      registerUserWantlistTools(server);
      registerUserListsTools(server);
      registerMediaTools(server);
    }
Behavior2/5

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

With no annotations, the description carries full burden but only states it 'gets a list' without detailing return format, pagination, sorting, or what 'recent' means. It lacks behavioral context like rate limits, authentication needs, or whether it's read-only (implied but not explicit).

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 with no wasted words. It's front-loaded with the core purpose ('Get a list'), making it easy to parse quickly.

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?

For a tool with no annotations, no output schema, and 0 parameters, the description is minimal. It states the purpose but lacks details on behavior, output format, or error handling, leaving significant gaps for an AI agent to understand its full context.

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

Parameters4/5

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

There are 0 parameters, and schema description coverage is 100%, so no parameter documentation is needed. The description doesn't add param info, but that's acceptable given the empty schema, warranting a baseline score above minimum.

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 ('Get a list') and resource ('exports of your inventory'), with 'recent' providing some scope. It distinguishes from sibling 'get_inventory_export' (singular) by implying multiple exports, but doesn't explicitly contrast with 'inventory_export' or 'download_inventory_export'.

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 on when to use this tool versus alternatives like 'inventory_export' or 'download_inventory_export' is provided. The description implies a listing function but doesn't specify prerequisites, timing, or exclusions.

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