Skip to main content
Glama

Insert Order

insert_order

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

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": {
      "orderInfo": "<orderInfo>"
    },
    "name": "insert_order"
  }
}

Input Schema

NameRequiredDescriptionDefault
orderInfoYesThe order to create

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, the description discloses the critical duplicate-creation risk on uncertain failures and prescribes a verification path before retrying. It also states the return value (orderId), which annotations do not cover. This is exactly the behavioral context an agent needs for a non-idempotent insert.

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?

The description is front-loaded with what the tool creates and returns, followed by required inputs and failure protocol. It repeats some schema requirements, but each sentence contributes useful operational or safety information.

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?

Given the complex nested schema and the absence of an output schema, the description covers the return value, required top-level and nested fields, and the crucial retry-versus-verify behavior. Nothing essential for calling this insert safely is missing.

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 the schema already documents the nested required fields and address breakdown. The description summarizes required fields and notes the one-line address plus addressDetail requirement, but it adds little meaning beyond the schema's existing required arrays and property descriptions.

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 description states a specific verb and resource: it creates a new delivery order for the current company and returns its orderId. This clearly distinguishes it from sibling tools like edit_order and get_order_by_id.

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 operational guidance: ask the user for missing required values, retry after a definite 'not created' failure, and call get_current_active_orders or get_current_scheduled_orders instead of retrying when creation cannot be confirmed. The alternative is named with the precise condition that selects it.

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