Skip to main content
Glama
cswkim

Discogs MCP Server

by cswkim

get_marketplace_orders

Retrieve and filter marketplace orders from Discogs by status, date, and other criteria to manage sales and track transactions.

Instructions

Get a list of marketplace orders

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
statusNo
created_afterNo
created_beforeNo
archivedNo
pageNo
per_pageNo
sortNo
sort_orderNo

Implementation Reference

  • The MCP tool handler (execute function) for 'get_marketplace_orders'. It creates a MarketplaceService instance and calls getOrders with the input args, returning the JSON stringified result or formatted error.
    export const getMarketplaceOrdersTool: Tool<FastMCPSessionAuth, typeof OrdersParamsSchema> = {
      name: 'get_marketplace_orders',
      description: 'Get a list of marketplace orders',
      parameters: OrdersParamsSchema,
      execute: async (args) => {
        try {
          const marketplaceService = new MarketplaceService();
          const orders = await marketplaceService.getOrders(args);
    
          return JSON.stringify(orders);
        } catch (error) {
          throw formatDiscogsError(error);
        }
      },
    };
  • Zod schema defining the input parameters for the get_marketplace_orders tool, including optional status, date filters, archived flag, and query params.
    export const OrdersParamsSchema = z
      .object({
        status: OrderStatusSchema.optional(),
        created_after: z.string().optional(),
        created_before: z.string().optional(),
        archived: z.boolean().optional(),
      })
      .merge(QueryParamsSchema(['id', 'buyer', 'created', 'status', 'last_activity'] as const));
  • Function that registers all marketplace tools, including getMarketplaceOrdersTool, to the FastMCP server. This function is called from src/tools/index.ts.
    export function registerMarketplaceTools(server: FastMCP): void {
      server.addTool(getUserInventoryTool);
      server.addTool(getMarketplaceListingTool);
      server.addTool(createMarketplaceListingTool);
      server.addTool(updateMarketplaceListingTool);
      server.addTool(deleteMarketplaceListingTool);
      server.addTool(getMarketplaceOrderTool);
      server.addTool(editMarketplaceOrderTool);
      server.addTool(getMarketplaceOrdersTool);
      server.addTool(getMarketplaceOrderMessagesTool);
      server.addTool(createMarketplaceOrderMessageTool);
      server.addTool(getMarketplaceReleaseStatsTool);
    }
  • The MarketplaceService.getOrders method, which performs the actual API request to Discogs /marketplace/orders endpoint with params, validates response with OrdersResponseSchema, and handles errors.
    async getOrders(params: OrdersParams): Promise<OrdersResponse> {
      try {
        const response = await this.request<OrdersResponse>(`/orders`, {
          params,
        });
    
        const validatedResponse = OrdersResponseSchema.parse(response);
        return validatedResponse;
      } catch (error) {
        if (isDiscogsError(error)) {
          throw error;
        }
    
        throw new Error(`Failed to get orders: ${String(error)}`);
      }
    }
  • Invocation of registerMarketplaceTools in the main registerTools function, which adds the get_marketplace_orders tool to the MCP server.
    registerMarketplaceTools(server);
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 only states the action ('Get a list') without detailing aspects like whether it's read-only, requires authentication, has rate limits, returns paginated results, or handles errors. This leaves critical behavioral traits unspecified for a tool with 8 parameters.

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, straightforward sentence with no wasted words, making it easy to parse. However, it is overly concise to the point of under-specification for a tool with 8 parameters, lacking necessary details that would enhance usability without adding bulk.

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 tool's complexity (8 parameters, no annotations, no output schema), the description is incomplete. It does not cover parameter meanings, return values, or behavioral traits, making it inadequate for an AI agent to effectively use the tool without additional context or guesswork.

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?

The schema description coverage is 0%, meaning parameters are undocumented in the schema. The description adds no information about parameters, failing to explain what 'status', 'created_after', 'archived', or others mean in context. It does not compensate for the lack of schema documentation, leaving parameters ambiguous.

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 'Get a list of marketplace orders' clearly states the verb ('Get') and resource ('marketplace orders'), making the purpose understandable. However, it lacks specificity about what 'list' entails (e.g., filtered, paginated) and does not distinguish it from sibling tools like 'get_marketplace_order' (singular) or 'edit_marketplace_order', leaving room for ambiguity.

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?

The description provides no guidance on when to use this tool versus alternatives. It does not mention when to prefer this over 'get_marketplace_order' (for a single order) or 'search' (for broader queries), nor does it specify prerequisites or typical use cases, offering minimal context for decision-making.

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