Skip to main content
Glama

track_order

Check the current status and estimated delivery time for your Drizly order using the order ID.

Instructions

Track the current status and estimated delivery time of an order

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
orderIdYesOrder ID to track (format: DRZ-XXXXXXXXXX)

Implementation Reference

  • Core implementation of trackOrder method that searches for an order by ID and simulates status progression based on elapsed time since order placement
    trackOrder(orderId: string): DrizlyOrder | null {
      const order = this.orders.find((o) => o.id === orderId);
      if (!order) return null;
    
      // Simulate order status progression based on time
      const placedTime = new Date(order.placedAt).getTime();
      const elapsed = Date.now() - placedTime;
      const minutes = elapsed / 60000;
    
      if (minutes < 5) {
        order.status = "confirmed";
      } else if (minutes < 15) {
        order.status = "preparing";
      } else if (minutes < 35) {
        order.status = "out_for_delivery";
      } else {
        order.status = "delivered";
      }
    
      return order;
    }
  • MCP tool handler that validates input, calls the trackOrder method, and returns formatted response with order status and user-friendly status messages
    case "track_order": {
      const params = TrackOrderSchema.parse(args);
      const order = drizly.trackOrder(params.orderId);
    
      if (!order) {
        return {
          content: [
            {
              type: "text",
              text: JSON.stringify(
                { error: `Order '${params.orderId}' not found` },
                null,
                2
              ),
            },
          ],
        };
      }
    
      const statusMessages: Record<string, string> = {
        confirmed: "Your order has been confirmed and is being processed",
        preparing: "The store is preparing your order",
        out_for_delivery: "Your order is on its way!",
        delivered: "Your order has been delivered",
      };
    
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(
              {
                orderId: order.id,
                status: order.status,
                statusMessage: statusMessages[order.status] || order.status,
                estimatedDelivery: order.estimatedDelivery,
                order,
              },
              null,
              2
            ),
          },
        ],
      };
    }
  • Zod schema definition for validating track_order tool input parameters
    const TrackOrderSchema = z.object({
      orderId: z.string().describe("Order ID to track (e.g., DRZ-1234567890)"),
    });
  • src/index.ts:261-273 (registration)
    Tool registration in the ListToolsRequestSchema handler defining the track_order tool with its JSON Schema input specification
      name: "track_order",
      description: "Track the current status and estimated delivery time of an order",
      inputSchema: {
        type: "object",
        properties: {
          orderId: {
            type: "string",
            description: "Order ID to track (format: DRZ-XXXXXXXXXX)",
          },
        },
        required: ["orderId"],
      },
    },
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool retrieves status and delivery time, implying a read-only operation, but doesn't cover aspects like error handling (e.g., invalid order IDs), rate limits, authentication needs, or whether it's idempotent. For a tool with zero annotation coverage, this leaves significant gaps in understanding its behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core purpose without unnecessary words. It directly states what the tool does ('track the current status and estimated delivery time of an order'), making it easy to parse and understand quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (a single parameter with full schema coverage) and lack of annotations or output schema, the description is minimally adequate. It covers the basic purpose but lacks details on usage context, behavioral traits, and output format, which could hinder an agent's ability to use it effectively in varied scenarios.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, with the 'orderId' parameter clearly documented in the schema itself. The description doesn't add any parameter-specific details beyond what the schema provides, such as examples or contextual usage. With high schema coverage, the baseline score of 3 is appropriate, as the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose with specific verbs ('track') and resources ('order'), specifying what information is retrieved ('current status and estimated delivery time'). It doesn't explicitly differentiate from sibling tools like 'get_orders', but the focus on tracking a specific order's status and delivery time is reasonably distinct.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'get_orders' (which might list orders without tracking details) or 'place_order' (for creating orders). There's no mention of prerequisites, such as needing a valid order ID, or contextual cues for when tracking is appropriate versus other order-related operations.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/markswendsen-code/mcp-drizly'

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