Skip to main content
Glama

Edit an order

order_edit
Idempotent

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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
itemsNoItems to add (only for unvalidated orders or new orders)
clientNoInline customer details
idUserNoStaff member ID
idtableNoTable ID
orderIDYesID of the order to modify
paymentYes-2 = not paid, not validated | -1 = not paid, validated (invoice) | payment method ID = record a payment
idClientNoCustomer ID
idcaisseNoCash register ID
pagerNumNoPager/buzzer number
numcouvertsNoNumber of covers/guests
paymentAmountNoAmount paid (partial payment support)
publicCommentNoComment visible on the receipt
deliveryMethodNoDelivery method: 0=takeaway, 1=delivery, 2=on-site, 3=drive, 4=relay, 5=table service, 6=room service
privateCommentNoInternal staff-only comment

TDQS

A4.6/5.0
Behavior5/5

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

Beyond idempotentHint and destructiveHint annotations, the description reveals detailed behavioral traits: how payment values control state transitions, the order lifecycle for item modifications, and that returns include orderID, payment link, and PDF URL. No contradiction with annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise, front-loads the main purpose, then logically explains payment options, constraints, and return values. Every sentence adds value without redundancy.

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?

Given 14 parameters and no output schema, the description effectively covers key behaviors: payment state machine, item modification rules, and return values. It could mention error handling or prerequisites but provides sufficient context for an agent to use correctly.

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 high (100%), but the description adds significant meaning beyond schema: explaining the payment field's semantics with specific values and behaviors, partial payment via paymentAmount, and constraints on items array (only for unvalidated orders).

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 starts with 'Modify an existing order by its ID', clearly stating the action, resource, and identifier. It distinguishes from siblings like order_create and order_detail by focusing on modifying an existing order and explaining payment field behavior.

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?

The description provides explicit guidance on payment values (-2, -1, payment method ID) and their effects on order state. It also states when items can be modified (only on unvalidated orders) and when only payments are allowed (after validation). This gives clear context for appropriate usage.

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.

TDQS

A3.7/5.0
Disambiguation5/5

Each tool targets a distinct entity or action (account, client, order, product, payment, VAT, etc.), with clear naming like 'account_create' vs 'account_edit' and 'data_list_' prefixed listings. No overlapping purposes detected.

Naming Consistency5/5

All tool names use snake_case and follow a consistent verb_noun pattern (e.g., account_create, client_add, data_list_clients). Even compound names like auth_login_with_otp adhere to this structure.

Tool Count4/5

41 tools is high but justified by the wide scope of a POS/accounting system (accounts, clients, orders, products, payments, VAT, reports). Slightly above the typical range but well-scoped.

Completeness5/5

The tool surface covers CRUD for all major entities (clients, departments, products, VAT, payment modes, orders), plus queries, reports, and authentication. No obvious gaps for a small business management server.

Resources