delete_orders
ChatGPTPermanently deletes one or more orders of the current company. This cannot be undone, and the assigned driver is notified. Before calling it, tell the user exactly which orders (order number and orderId) will be deleted and get their confirmation. Never delete orders the user did not clearly ask for. Find the orderId with get_current_active_orders, get_current_scheduled_orders or get_order_by_id. Orders that are delivered or completed, picked up, or out for delivery, and orders assigned to a third party, cannot be deleted. A call can partly succeed. The result has three lists: deletedOrders (deleted), notFoundOrders (no such order in this company) and notDeletedOrders (the order exists but may not be deleted). Report each list to the user, and do not retry orders in notDeletedOrders. At most 50 orders per call. If the call says it could not confirm whether the orders were deleted, check the current orders to see which still exist before trying again.Always take confirmation from the user before deleting.
edit_order
ChatGPTEdits an existing order of the current company. Editing REPLACES the whole order: it is not a partial update, and fields you leave out can be reset or cleared. So first fetch the current order with get_order_by_id (or find it in get_current_active_orders or get_current_scheduled_orders), then send the COMPLETE order in orderInfo with only the changes the user asked for applied. customer, restaurant, costInfo, paymentInfo and activityLog are always required. Cost amounts are saved in two groups, (totalCost, tax, discount, serviceFee) and (deliveryFee, tip, cashTip). If any value in a group changes, the whole group is rewritten and omitted values become 0, so always send every amount. deliveryInstruction is cleared if omitted. The restaurant name and phoneNumber are cleared if omitted, paymentMethod is cleared if omitted, and isCatering resets to false if omitted, so send the current values. The restaurant address is always required. orderNumber and orderItems are left unchanged if omitted. A change to addressDetail is only saved if the one-line address, the name, the phone or the email also changes, so change the address line whenever the address breakdown changes. Changing an address line triggers address lookup, which can take a few seconds. If the call says it could not confirm whether the order was updated, fetch the order and compare before trying again.You also need to think if editing something needs change in other fields. For example, changing the quantity of an item should also impact on totalCost. You should ask the user and get confirmation before making any such changes.
get_carrier_earnings
ChatGPTReturns today's earnings for each driver (carrier) for the current company.
get_carriers
ChatGPTReturns the list of drivers (carriers) and their details for the current company.
get_current_active_orders
ChatGPTReturns the paginated list of currently active orders (not yet delivered or failed, and already eligible for dispatch) for the current company. Defaults to page 1 with up to 300 orders if page/limit are omitted. Check the returned meta.totalPages and meta.nextPage: if meta.page is less than meta.totalPages and the user's request requires seeing every active order (not just a sample or summary), call this tool again with page=meta.nextPage to fetch the remaining pages, without asking the user to specify a page number themselves.
get_current_scheduled_orders
ChatGPTReturns the paginated list of currently scheduled orders (not yet dispatch-eligible, i.e. scheduled for future pickup/delivery) for the current company. Defaults to page 1 with up to 300 orders if page/limit are omitted. Check the returned meta.totalPages and meta.nextPage: if meta.page is less than meta.totalPages and the user's request requires seeing every scheduled order (not just a sample or summary), call this tool again with page=meta.nextPage to fetch the remaining pages, without asking the user to specify a page number themselves.
get_customer_profiles
ChatGPTReturns the paginated list of customer profiles (aggregated order history, spending, ratings, and VIP/subscription status per customer) for the current company. Defaults to page 1 with up to 50 customers if page/limit are omitted. Supports searching by name, filtering by order type/customer type/order and driver rating, and sorting. Check the returned meta.totalPages and meta.nextPage: if meta.page is less than meta.totalPages and the user's request requires seeing every customer (not just a sample or summary), call this tool again with page=meta.nextPage to fetch the remaining pages, without asking the user to specify a page number themselves.
get_deleted_orders
ChatGPTReturns orders that were deleted within the given time range for the current company. Only data from the current calendar month is available.
get_extended_reports
ChatGPTReturns detailed order delivery timing and cost info for the given time range for the current company for completed orders. For completed orders, everything is included in this report. Only data from the current calendar month is available.
get_order_by_id
ChatGPTReturns one order of the current company by its orderId, in the same shape as the orders from get_current_active_orders and get_current_scheduled_orders. It finds orders that are currently active or scheduled. An order that is already delivered or failed, or does not exist for this company, returns an error. Use it to fetch the latest state of one order before editing it: the order contains every field that edit_order uses, under the same names, so send it to edit_order with only the requested changes applied.
insert_order
ChatGPTCreates a new delivery order for the current company and returns its orderId. Required: orderNumber, customer (name, address, phoneNumber, addressDetail), restaurant (addressDetail), and costInfo. addressDetail needs street, city, state, zip and country (unit is optional) for both the customer and the restaurant, in addition to the one-line address. Ask the user for any required value they have not given instead of guessing it. If the call fails with a message saying the order was not created, fix the problem and retry. If it says it could not confirm whether the order was created, do NOT retry straight away: call get_current_active_orders (and get_current_scheduled_orders for scheduled orders) to check whether the order exists first, because retrying could create a duplicate.
get_carrier_earnings
Claudeget_carriers
Claudeget_deleted_orders
Claudeget_extended_orders
Claude