Skip to main content
Glama

Record an order

order_create
DestructiveIdempotent

Record a new order in the connected shop. Input includes paymentMode, and items[]. Each item can be of type 'catalog' (with productId), 'department' (with price and deptId) or 'free' (with title and price). Check if the client already exists using data_list_clients and if the client exists, only specify idClient. If provided, paymentMode should correspond to a payment ID from data_list_payments_modes tool. Returns a sale confirmation JSON including: a link to the PDF invoice, and a link to a private order page showing full order details which can also be used by the client to pay online. IMPORTANT: before creating a validated invoice (payment ≠ -2), call account_show_infos to verify that shopName, adressline1, and companyRegistrationNum are all set. If any of these fields are empty, warn the user and suggest using account_edit to fill them in before issuing invoices.

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>",
      "items": "<items>"
    },
    "name": "order_create"
  }
}

Input Schema

NameRequiredDescriptionDefault
itemsYes
clientNoNew customer details, used when idClient is omitted. Requires customers.write in addition to sales.write.
idtableNoTable ID for table-service orders
paymentNoKash payment method ID. Omit or use 0 to save an unpaid quote.
idClientNoExisting customer ID (alternative to inline client object)
idcaisseNoCash register ID
pagerNumNoPager/buzzer number for the customer
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.3/5.0
Behavior4/5

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

With no output schema, the description carries the return-value burden and does so: a sale confirmation JSON with a PDF invoice link and a private order page the client can use to pay. It also discloses a real operational constraint (invoice validation requires shop name/address/registration number). It does not discuss the destructive/irreversible nature of committing a sale or what happens on retry, which annotations already hint at via destructiveHint/idempotentHint.

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 prose is dense but front-loaded correctly: purpose, then item shapes, then customer resolution, then the invoice-validation prerequisite marked IMPORTANT. A few clauses (payment ID lookup, invoice link description) could be tightened, but nothing is filler.

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 13-parameter, nested-object mutation with no output schema, the description covers the critical paths: item construction, customer resolution, payment source, and invoice preconditions. The remaining gaps are the sentinel mismatch for unpaid quotes (prose says payment ≠ -2, schema says omit or 0) and no guidance on the table/pager/cover parameters for table-service orders.

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 coverage is 92%, so the baseline is 3, and the description does add meaning about the idClient-vs-client tradeoff and the origin of payment IDs. However, it names fields that do not match the schema: 'paymentMode' versus 'payment', and item type 'department' with 'deptId' versus the schema's type 'dept' and 'departmentId' — an agent following the prose literally would produce schema-invalid payloads.

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 opens with a specific verb and resource ('Record a new order in the connected shop') and immediately enumerates the three item shapes (catalog/department/free). It clearly distinguishes creation from sibling operations such as order_edit and order_detail by framing everything around a brand-new sale.

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 and routing: call data_list_clients first and pass only idClient when the customer exists, obtain payment IDs from data_list_payments_modes, and call account_show_infos before issuing a validated invoice. It even specifies the fallback (warn the user and suggest account_edit) when shop identity fields are empty.

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