Skip to main content
Glama

Edit an order

order_edit
DestructiveIdempotent

Modify an existing order by its ID. Use the payment field to control the order state: -2 = keep as unvalidated quote (not paid); -1 = validate as invoice without payment; a payment method ID (from data_list_payments_modes) = record an actual payment and validate the order. Use paymentAmount to specify a partial payment amount (omit for full payment). Items can only be added or changed on unvalidated orders. Once validated, only payments can be recorded. Returns the orderID, a payment link, and a PDF invoice or quote URL.

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": {
      "idempotencyKey": "<idempotencyKey>",
      "orderID": "<orderID>",
      "payment": "<payment>"
    },
    "name": "order_edit"
  }
}

Input Schema

NameRequiredDescriptionDefault
itemsNo
clientNoNew customer details, used when idClient is omitted. Requires customers.write in addition to sales.write.
idtableNoTable ID
orderIDYesID of the order to modify
paymentYes-2 for a pending quote, -1 for an unpaid invoice, 0 for no collection, or a positive Kash payment method ID to record payment.
idClientNoCustomer ID
idcaisseNoCash register ID
pagerNumNoPager/buzzer number
numcouvertsNoNumber of covers/guests
paymentAmountNoAmount collected, including for a partial payment (for example 12.50). With a positive payment method, supply an amount greater than zero or omit it to use the worker default.
publicCommentNoComment visible on the receipt
deliveryMethodNoDelivery method: 0=takeaway, 1=delivery, 2=on-site, 3=drive, 4=relay, 5=table service, 6=room service
idempotencyKeyYesUnique ID for this operation, such as a UUID. After a timeout, retry with the same key and arguments. Use a new key for each distinct operation.
privateCommentNoInternal staff-only comment

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added
  2. Removed
  3. First observed

TDQS

A4/5.0
Behavior4/5

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

Beyond the annotations (destructive=true, idempotent=true, non-readOnly), the description discloses the state machine: once validated, only payments can be recorded, which signals an irreversible transition. It also returns concrete artifacts (orderID, payment link, PDF invoice or quote URL), compensating for the missing output schema; it omits any note on idempotency-key retry behavior beyond what the schema states.

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 the core action, then flows into state rules and return values with no filler sentences. The payment-value explanation is compressed into a single dense clause, which is efficient but slightly bullet-like readability would help.

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 14-parameter mutation tool with nested item objects and no output schema, the description covers the highest-risk semantics (order state transitions, item lockout after validation) and the return artifacts. Remaining gaps — the customer-creation side effect of the 'client' object and permission requirements — are documented in the schema itself.

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 93%, so baseline is 3, but the description adds genuine meaning to the two trickiest fields: the meaning of each negative payment value and the omit-for-full-payment rule for paymentAmount. It does omit payment value 0 ('no collection'), which only the schema documents, leaving a small inconsistency.

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?

The first sentence gives a specific verb and resource ('Modify an existing order by its ID'), which is clearly distinct from the create/detail siblings implied by the name. It stops short of naming an alternative tool, so an agent must infer that order_create/order_detail cover the non-edit cases.

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?

Strong conditional guidance: it explains the payment value ladder (-2 quote, -1 unpaid invoice, positive payment-method ID), states that items can only be added or changed on unvalidated orders, and points to data_list_payments_modes as the source of payment method IDs. It lacks explicit preconditions such as required permissions and doesn't name a sibling for creating new orders.

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