Skip to main content
Glama

Create or update an order

optimoroute_create_order
Destructive

Create one order, or update an existing one, with address geocoding. operation: CREATE (new; errors if orderNo exists), UPDATE (existing only), MERGE (create or update only the fields you send — safest for edits), SYNC (create or REPLACE all fields with what you send). CREATE/SYNC/MERGE of a new order need date, type, location and orderNo or id. A location is either an existing locationNo alone, an address to geocode, or latitude+longitude+locationName. OptimoRoute: POST /create_order.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idNoOptimoRoute's order id. Takes priority over orderNo when matching.
dateNoOrder date, YYYY-MM-DD.
typeNoD = delivery, P = pickup, T = task.
emailNoCustomer email for notifications.
load1NoLoad units #1 (boxes, kg, ...) per your capacity setup.
load2NoLoad units #2.
load3NoLoad units #3.
load4NoLoad units #4.
notesNoNotes for the driver's instructions.
phoneNoCustomer phone number.
skillsNoRequired driver skill codes.
orderNoNoYour order number, shown in the web app. Used to match existing orders.
durationNoService time at the location, in minutes.
locationNoWhere the order is serviced.
priorityNoL low, M medium (default), H high, C critical.
operationYesHow to apply the order (see description).
relatedIdNoid of a related pickup/delivery.
assignedToNoForce the order onto one driver, e.g. {"serial": "102"} or {"externalId": "444"}. null clears it.
timeWindowsNoWhen the order can be serviced, e.g. [{"twFrom": "10:00", "twTo": "14:00"}].
allowedDatesNoRestrict the dates the order may be scheduled, e.g. {"from": "2026-10-01", "to": "2026-10-07"}.
customField1NoLegacy custom field #1.
customField2NoLegacy custom field #2.
customField3NoLegacy custom field #3.
customField4NoLegacy custom field #4.
customField5NoLegacy custom field #5.
customFieldsNoNew-style custom fields keyed by the field key configured in OptimoRoute.
relatedOrderNoNoorderNo of a related pickup/delivery (set on the second order of the pair).
allowedWeekdaysNoWeekdays the order may be scheduled on. Default: all.
vehicleFeaturesNoRequired vehicle feature codes.
allowedDateTimesNoDatetime windows in which the service may begin.
acceptDuplicateOrderNoNoAllow CREATE of an order whose orderNo already exists.
notificationPreferenceNoHow order-tracking notifications are delivered for this order.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. First observed

TDQS

A4/5.0
Behavior4/5

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

With only destructiveHint=true in annotations, the description carries the real burden and delivers: geocoding behavior, the error condition on duplicate orderNo, and the fact that SYNC replaces all fields with what you send — a concrete data-loss disclosure consistent with the destructive annotation. It does not mention authentication/permission requirements or whether geocoding failures are recoverable beyond the storeInvalid flag.

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-loads the operation-mode taxonomy, then the required-field and location rules, then the raw API endpoint. Dense but each sentence carries distinct information; the em-dash clauses make it slightly run-on but nothing is redundant.

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

Completeness4/5

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

For a 32-parameter mutation tool with no output schema and only one required field, the description covers the operation modes, new-order prerequisites, and location representation — the parts an agent must get right. It omits any statement of what the call returns or how failures surface, which is the main remaining gap.

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 description coverage is 100%, so the baseline is 3; the description earns above baseline by adding cross-parameter rules the schema cannot express — the three mutually exclusive ways to express a location (existing locationNo alone, an address to geocode, or lat/long + locationName) and the four required fields for new orders. It does not clarify the id-vs-orderNo matching precedence (that detail lives only in the schema).

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?

States a specific verb+resource (create/update one order) and enumerates the four operation modes with their distinct semantics, which is far more than a restatement of the title. It only implicitly distinguishes itself from the sibling `optimoroute_create_or_update_orders` via the phrase 'one order', never naming the batch alternative.

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

Usage Guidelines4/5

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

Gives per-mode selection guidance: CREATE 'errors if orderNo exists', UPDATE 'existing only', MERGE 'safest for edits', SYNC 'create or REPLACE all fields'. That is genuine when-to-use advice for the operation parameter. It stops short of saying when to prefer this tool over its plural sibling or the read tools.

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.