get_marketplace_order
Retrieve details of a specific Discogs marketplace order by providing its order ID to access transaction information.
Instructions
Get a marketplace order
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| order_id | Yes |
Implementation Reference
- src/tools/marketplace.ts:103-117 (handler)MCP tool handler (execute function) for 'get_marketplace_order', which delegates to MarketplaceService.getOrderexport const getMarketplaceOrderTool: Tool<FastMCPSessionAuth, typeof OrderIdParamSchema> = { name: 'get_marketplace_order', description: 'Get a marketplace order', parameters: OrderIdParamSchema, execute: async (args) => { try { const marketplaceService = new MarketplaceService(); const order = await marketplaceService.getOrder(args); return JSON.stringify(order); } catch (error) { throw formatDiscogsError(error); } }, };
- src/types/marketplace.ts:192-194 (schema)Input parameter schema for the tool: requires 'order_id' as a number.export const OrderIdParamSchema = z.object({ order_id: z.number(), });
- src/tools/marketplace.ts:246-246 (registration)Registration of the getMarketplaceOrderTool with the FastMCP server.server.addTool(getMarketplaceOrderTool);
- src/services/marketplace.ts:151-164 (helper)Implementation of getOrder in MarketplaceService, performs authenticated API request to Discogs /orders/{order_id} and validates response.async getOrder({ order_id }: OrderIdParam): Promise<OrderResponse> { try { const response = await this.request<OrderResponse>(`/orders/${order_id}`); const validatedResponse = OrderResponseSchema.parse(response); return validatedResponse; } catch (error) { if (isDiscogsError(error)) { throw error; } throw new Error(`Failed to get order: ${String(error)}`); } }