getOrderStatus.ts•799 B
import { z } from "zod";
import { DeBridgeClient } from "../debridgeClient";
const client = new DeBridgeClient();
/**
* MCP Tool: Check cross-chain order status by order ID.
* Returns transaction hashes, current status, and order links.
*
* Possible statuses: "None", "Created", "Fulfilled", "SentUnlock", "OrderCancelled",
* "SentOrderCancel", "ClaimedUnlock", "ClaimedOrderCancel"
*/
export const getOrderStatusTool = {
name: "getOrderStatus",
description: "Check the status of a deBridge cross-chain order by order ID",
inputSchema: z.object({
orderId: z
.string()
.describe("The order ID to check status for (obtained from creating an order)")
}),
handler: async (input: { orderId: string }) => {
return await client.getOrderStatus(input.orderId);
}
};