Skip to main content
Glama

Delete Orders

delete_orders
DestructiveIdempotent

Permanently 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.

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": {
      "orderIds": "<orderIds>"
    },
    "name": "delete_orders"
  }
}

Input Schema

NameRequiredDescriptionDefault
orderIdsYesThe orderId of each order to delete
deleteRemarksNoOptional reason for the deletion, saved with the deleted order

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the annotations (destructiveHint=true, idempotentHint=true) it discloses side effects the annotations cannot: the driver is notified, deletion is irreversible, the call can partly succeed with three distinct result lists, notDeletedOrders must not be retried, and there is a 50-order cap. It also handles the ambiguous-failure case by instructing verification via the read tools before retrying.

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?

Well structured and front-loaded: purpose, side effects, preconditions, eligibility rules, result semantics, limits, then failure handling. It is long but nearly every sentence carries operational value; the closing sentence "Always take confirmation from the user before deleting" repeats the earlier confirmation instruction and a missing space after "again." is a minor flaw.

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?

For a destructive mutation tool with no output schema, this covers everything an agent needs: confirmation protocol, orderId discovery path, eligibility restrictions, batch limit, partial-failure reporting, and retry policy. Nothing material is left to guess.

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?

Schema description coverage is 100%, so orderIds and deleteRemarks are already documented in the schema, and the baseline of 3 applies. The description reinforces that orderIds come from the discovery tools and that they are orderIds rather than order numbers, but adds nothing about deleteRemarks or the id format beyond what the schema states.

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?

The first sentence states a specific verb ("Permanently deletes"), resource ("orders"), and scope ("of the current company"), which distinguishes it from read tools like get_current_active_orders and from edit_order. The destructive/permanent framing is front-loaded so an agent immediately knows what class of operation this is.

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?

It gives explicit prerequisites (user confirmation naming order number and orderId, never deleting unrequested orders), explicit exclusions (delivered, completed, picked up, out for delivery, third-party assigned), and names the specific sibling tools for obtaining orderIds. Both when-to-use and when-not-to-use are covered without inference.

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