hou_tea_check_order
Check the current status of a tea order by its ID. Polls automatically until payment is confirmed via USDC settlement.
Instructions
[core] Poll the status of a previously created order. Status transitions: pending_payment → verifying → confirmed (after on-chain USDC settlement). Use exponential backoff (~2s, 4s, 8s …, max ~60s).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| order_id | Yes |
Implementation Reference
- src/tools/registry.ts:252-252 (handler)The execute handler for 'hou_tea_check_order' — calls houTea.orderStatus with the order_id argument.
execute: (args) => houTea.orderStatus(String((args as Record<string, unknown>).order_id)), - src/tools/registry.ts:251-251 (schema)Input schema for 'hou_tea_check_order' — requires a single string parameter 'order_id'.
inputSchema: obj({ order_id: { type: "string", minLength: 1 } }, ["order_id"]), - src/tools/registry.ts:245-266 (registration)Full registration of 'hou_tea_check_order' as a core tool with metadata, input schema, execute function, and nextAction hint logic.
name: "hou_tea_check_order", group: "core", summary: "Poll order status (pending_payment → confirmed).", description: "Poll the status of a previously created order. Status transitions: pending_payment → verifying → confirmed (after on-chain USDC settlement). Use exponential backoff (~2s, 4s, 8s …, max ~60s).", uiComponent: "OrderTimeline", inputSchema: obj({ order_id: { type: "string", minLength: 1 } }, ["order_id"]), execute: (args) => houTea.orderStatus(String((args as Record<string, unknown>).order_id)), nextAction: (_args, data) => { if (!isObject(data)) return undefined; const status = (data.status ?? data.order_status) as string | undefined; if (status === "confirmed" || status === "settled") { return [ { tool: "hou_tea_list_my_orders", reason: "Order confirmed; the buyer can now list / track their order history.", }, ]; } return undefined; }, }, - src/client.ts:199-201 (helper)HTTP client helper — makes a GET request to /api/v1/orders/:order_id to fetch the order status.
orderStatus: async (order_id: string) => { return getJson<unknown>(`${DEFAULT_PAY_BASE}/api/v1/orders/${encodeURIComponent(order_id)}`); },