get_order
Retrieve detailed order information by ID to track shipments and manage fulfillment processes.
Instructions
Retrieve detailed information about a specific Order (TMF622).
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The generic Order ID |
Implementation Reference
- src/index.ts:595-603 (handler)Tool handler for 'get_order' in the main server loop, which imports and calls the orderService.getOrder method.
case 'get_order': { const { orderService } = await import('./orders/service.js'); const id = args?.id as string; const order = await orderService.getOrder(id); if (!order) { return { content: [{ type: 'text', text: `Error: Order not found: ${id}` }], isError: true }; } return { content: [{ type: 'text', text: JSON.stringify(order, null, 2) }] }; } - src/orders/service.ts:40-44 (handler)The actual implementation of the getOrder logic that fetches the order data from the Redis/Valkey store.
async getOrder(orderId: string): Promise<Order | null> { const data = await this.getClient().get(`order:${orderId}`); if (!data) return null; return JSON.parse(data); }