Skip to main content
Glama

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
NameRequiredDescriptionDefault
order_idYesThe order ID (e.g. CHIP-1001)

Implementation Reference

  • 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)"),
      },

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/YoshiSaurus/mcp-otle'

If you have feedback or need assistance with the MCP directory API, please join our Discord server