Skip to main content
Glama
cswkim

Discogs MCP Server

by cswkim

get_marketplace_release_stats

Retrieve marketplace statistics for a Discogs music release to analyze pricing trends and availability across different currencies.

Instructions

Retrieve marketplace statistics for the provided Release ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
release_idYes
curr_abbrNo

Implementation Reference

  • The main handler for the 'get_marketplace_release_stats' tool. Defines the tool object with name, description, input schema, and the execute function that creates a MarketplaceService instance and calls getReleaseStats on the provided arguments.
    export const getMarketplaceReleaseStatsTool: Tool<FastMCPSessionAuth, typeof ReleaseParamsSchema> =
      {
        name: 'get_marketplace_release_stats',
        description: 'Retrieve marketplace statistics for the provided Release ID',
        parameters: ReleaseParamsSchema,
        execute: async (args) => {
          try {
            const marketplaceService = new MarketplaceService();
            const stats = await marketplaceService.getReleaseStats(args);
    
            return JSON.stringify(stats);
          } catch (error) {
            throw formatDiscogsError(error);
          }
        },
      };
  • Input parameters schema for the tool, extending ReleaseIdParamSchema with optional currency code.
    export const ReleaseParamsSchema = ReleaseIdParamSchema.extend({
      curr_abbr: CurrencyCodeSchema.optional(),
    });
  • Registration of the tool in the FastMCP server within the registerMarketplaceTools function.
    server.addTool(getMarketplaceReleaseStatsTool);
  • Supporting helper method in MarketplaceService that performs the actual API call to retrieve marketplace stats for a release.
    async getReleaseStats({ release_id, ...options }: ReleaseParams): Promise<ReleaseStatsResponse> {
      try {
        const response = await this.request<ReleaseStatsResponse>(`/stats/${release_id}`, {
          params: options,
        });
    
        const validatedResponse = ReleaseStatsResponseSchema.parse(response);
        return validatedResponse;
      } catch (error) {
        if (isDiscogsError(error)) {
          throw error;
        }
    
        throw new Error(`Failed to get release stats: ${String(error)}`);
      }
    }
  • Base schema for release_id parameter used in ReleaseParamsSchema.
    export const ReleaseIdParamSchema = z.object({
      release_id: z.number().min(1, 'The release_id must be non-zero'),
    });
Behavior2/5

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

No annotations are provided, so the description carries full burden. It states 'Retrieve' which implies a read-only operation, but doesn't disclose behavioral traits such as rate limits, authentication needs, error conditions, or what the statistics include (e.g., aggregated data, real-time vs. historical). The description is minimal and lacks essential operational context.

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

Conciseness4/5

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

The description is a single, clear sentence with no wasted words. It's front-loaded with the core action and resource. However, it could be more structured by explicitly listing key statistics or use cases, but as-is, it's efficiently concise.

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 no annotations, no output schema, and 0% schema coverage, the description is incomplete. It doesn't explain what statistics are returned, their format, or any limitations. For a tool with 2 parameters in a marketplace context, this leaves significant gaps in understanding how to effectively use it.

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. It mentions 'Release ID' but doesn't explain its format or source, and omits 'curr_abbr' entirely. The description adds minimal meaning beyond the schema, failing to clarify parameter purposes or relationships (e.g., that curr_abbr might be for currency conversion in stats).

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

Purpose3/5

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

The description states the verb 'Retrieve' and resource 'marketplace statistics', which provides a basic purpose. However, it's vague about what specific statistics are retrieved (e.g., sales, views, pricing) and doesn't distinguish from sibling tools like 'get_marketplace_listing' or 'get_marketplace_orders'. The description is functional but lacks specificity.

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. The description doesn't mention prerequisites, context (e.g., for analytics or pricing decisions), or exclusions. With many sibling tools related to marketplace operations, the lack of differentiation leaves the agent without clear usage direction.

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