Skip to main content
Glama

Draft a delivery order

draft_delivery_order

Prices a food/drink DELIVERY order from the venue's menu (choices and sides included), finds the delivery address and quotes the delivery fee, without placing anything. Returns the items, delivery fee, total, distance and estimated delivery time, and a draftId that confirm_delivery_order places (place_delivery_order does both steps and follows the connection's permission setting). Requires the connected WaitApp account. Item ids and each item's optionGroups come from list_menu_items; chosen choices go in selectedOptions (group name and choice name), and a group with required=true must be chosen. Give the fullest address available (street or estate, area, city), or a savedLocationId. Fails with a clear message if the venue is closed, doesn't deliver, or the address is outside its delivery area. payment: pay_on_delivery (the guest pays the venue or rider on delivery) or online (the guest pays the meal on WaitApp's payment page after the order is placed; this tool and the assistant send and approve no payment). The delivery fee is always paid to the rider on delivery.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "restaurantId": "<restaurantId>",
      "items": "<items>",
      "guestName": "<guestName>",
      "guestPhone": "<guestPhone>"
    },
    "name": "draft_delivery_order"
  }
}

Input Schema

NameRequiredDescriptionDefault
itemsYes
paymentNoHow the guest pays for the meal. pay_on_delivery: nothing is charged here; they pay the venue/rider on delivery (default where the venue allows it). mobile_money: when the order is confirmed, a payment prompt is sent to mobileMoneyNumber and the guest approves it on their own phone. Some venues require mobile_money. The delivery fee is always paid to the rider on delivery.
guestNameYes
guestPhoneYesThe recipient's phone; the rider calls it on arrival
restaurantIdYes
deliveryAddressNoFull delivery address, e.g. 'Plot 12, Foxtale Court, Kawanda Road, Rhodes Park, Lusaka'. Not needed when savedLocationId is given
savedLocationIdNoThe id of one of the person's saved locations (see list_saved_locations), used instead of deliveryAddress

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • removedInput schema / properties / mobileMoneyNumber
      Removed value: -{
      -  "description": "Required for mobile_money: the guest's own mobile money number",
      -  "type": "string"
      -}
    • changedInput schema / properties / payment / enum
      Previous value: -[
      -  "pay_on_delivery",
      -  "mobile_money"
      -]New value: +[
      +  "pay_on_delivery",
      +  "online",
      +  "mobile_money"
      +]
  2. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only state it is a non-destructive, non-idempotent, non-read-only write. The description adds substantial beyond that: no payment is sent or approved by this tool or the assistant, the account prerequisite, the failure modes (venue closed, no delivery, address outside area), and the rule that the delivery fee is always paid to the rider on delivery.

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

Conciseness4/5

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

Front-loaded with what the tool does and returns before the operational details, and every clause carries information. However, it is delivered as one dense paragraph of long, parenthetically nested sentences, which makes it harder to scan than it needs to be.

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

Completeness5/5

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

With no output schema, the description fully enumerates the return payload (items, delivery fee, total, distance, ETA, draftId), plus prerequisites, failure behavior, and payment flow. Nothing an agent needs to call this correctly is missing.

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

Parameters4/5

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

Schema coverage is 57%, so the description does useful compensating work: it explains that selectedOptions carries group name + choice name, that required=true groups must be chosen, and that either a full address or savedLocationId is needed. It does omit the mobile_money enum value when listing payment options, though the schema's own enum description covers it.

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

Purpose5/5

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

States a precise verb+resource ('Prices a food/drink DELIVERY order from the venue's menu') with the explicit qualifier 'without placing anything', which isolates it from confirm_delivery_order and place_delivery_order in the sibling set. An agent can identify the tool without opening any schema.

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

Usage Guidelines5/5

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

Explicitly routes between the three sibling tools: this one drafts, confirm_delivery_order places the returned draftId, and place_delivery_order does both steps in one call. It also names list_menu_items as the source of item ids and optionGroups, and list_saved_locations for savedLocationId.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources