check_order_status
Check the status of a previously placed Chipotle order by providing the order ID to track its progress and delivery details.
Instructions
Check the status of a previously placed order.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| order_id | Yes | The order ID (e.g. CHIP-1001) |
Implementation Reference
- index.js:266-305 (handler)Handler logic for check_order_status tool, which looks up an order by ID and returns its status.
async ({ order_id }) => { const order = orders.find((o) => o.id === order_id); if (!order) { return { content: [ { type: "text", text: `Order ${order_id} not found. Either it doesn't exist or you ate it already.`, }, ], }; } // Simulate progress const elapsed = (Date.now() - new Date(order.placedAt).getTime()) / 1000; let status; if (elapsed > 120) { status = "Ready for Pickup!"; } else if (elapsed > 60) { status = "Almost done - wrapping your burrito with love"; } else if (elapsed > 30) { status = "Scooping rice with surgical precision"; } else { status = "In the queue - your tortilla is being spiritually prepared"; } order.status = status; const lines = [ `# Order Status: ${order.id}`, "", `**Name:** ${order.name}`, `**Status:** ${status}`, `**Ordered:** ${order.placedAt}`, `**Total:** $${order.total}`, "", `> ${getRandomQuip()}`, ]; return { content: [{ type: "text", text: lines.join("\n") }] }; } - index.js:260-265 (registration)Registration of the check_order_status tool.
server.tool( "check_order_status", "Check the status of a previously placed order.", { order_id: z.string().describe("The order ID (e.g. CHIP-1001)"), },