get_marketplace_order_messages
Retrieve messages for a Discogs marketplace order to track communication and manage transactions.
Instructions
Get a list of an order's messages
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | ||
| per_page | No | ||
| sort | No | ||
| sort_order | No | ||
| order_id | Yes |
Implementation Reference
- src/tools/marketplace.ts:141-158 (handler)MCP tool handler for 'get_marketplace_order_messages'. Instantiates MarketplaceService and delegates to its getOrderMessages method, returning JSON-stringified result or formatted error.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); } }, };
- src/types/marketplace.ts:206-206 (schema)Zod input schema for the tool parameters, combining general query params with required order_id.export const OrderMessagesParamsSchema = QueryParamsSchema().merge(OrderIdParamSchema);
- src/tools/marketplace.ts:249-249 (registration)Registers the tool with the FastMCP server instance.server.addTool(getMarketplaceOrderMessagesTool);
- src/services/marketplace.ts:176-194 (helper)MarketplaceService method implementing the core logic: makes authenticated GET request to Discogs `/orders/${order_id}/messages` API, 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)}`); } }