Skip to main content
Glama
cswkim

Discogs MCP Server

by cswkim

get_marketplace_order_messages

Retrieve and manage order message threads from Discogs marketplace by specifying order ID, page, and sorting parameters for efficient communication tracking.

Instructions

Get a list of an order's messages

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
order_idYes
pageNo
per_pageNo
sortNo
sort_orderNo

Implementation Reference

  • Definition and execute handler for the 'get_marketplace_order_messages' tool. Instantiates MarketplaceService and calls getOrderMessages with args, returning JSON stringified messages.
    export const getMarketplaceOrderMessagesTool: Tool< FastMCPSessionAuth, typeof OrderMessagesParamsSchema > = { name: 'get_marketplace_order_messages', description: `Get a list of an order's messages`, parameters: OrderMessagesParamsSchema, execute: async (args) => { try { const marketplaceService = new MarketplaceService(); const messages = await marketplaceService.getOrderMessages(args); return JSON.stringify(messages); } catch (error) { throw formatDiscogsError(error); } }, };
  • Input schema for the tool: OrderMessagesParamsSchema, which merges QueryParamsSchema and OrderIdParamSchema requiring order_id and optional query params.
    export const OrderMessagesParamsSchema = QueryParamsSchema().merge(OrderIdParamSchema);
  • Registration of the tool via server.addTool in registerMarketplaceTools function.
    server.addTool(getMarketplaceOrderMessagesTool);
  • High-level registration calling registerMarketplaceTools(server) which includes the marketplace tools.
    registerMarketplaceTools(server);
  • MarketplaceService.getOrderMessages method: makes authenticated GET request to Discogs /orders/{order_id}/messages, validates and returns paginated messages.
    async getOrderMessages({ order_id, ...options }: OrderMessagesParams): Promise<OrderMessagesResponse> { try { const response = await this.request<OrderMessagesResponse>(`/orders/${order_id}/messages`, { params: options, }); const validatedResponse = OrderMessagesResponseSchema.parse(response); return validatedResponse; } catch (error) { if (isDiscogsError(error)) { throw error; } throw new Error(`Failed to get order messages: ${String(error)}`); } }

Other Tools

Related 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