Skip to main content
Glama

Create a sales order

create_sales_order
Destructive

Creates a sales order, as a draft or with line items. Returns the order id, number, status and sku_url.

Input Schema

NameRequiredDescriptionDefault
dry_runNoValidate only; saves nothing.
store_idNo
order_dateYesISO date.
currency_idNo
customer_idNo
order_statusYesdraft, reserved, open or closed. A draft needs no lines; closed also needs fulfilled_at.
currency_codeYesISO currency code enabled on the account, e.g. USD.
idempotency_keyNoA repeat with this key replays the first result.
sales_order_linesNoLines: [{description, quantity, amount (unit price), product_id or sku, warehouse_id}].
customer_po_numberNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.1/5.0
Behavior3/5

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

Annotations already declare this is a non-readonly, destructive, non-idempotent operation, so the safety profile is covered. The description usefully adds the return fields (order id, number, status, sku_url) in the absence of an output schema, and mentions the draft mode, but says nothing about permissions, irreversibility of creates, or how the idempotency_key interacts with the declared idempotentHint=false.

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?

Two tight sentences, action front-loaded followed by return value. No wasted words.

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

Completeness3/5

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

For a 10-parameter destructive mutation with a 60% schema coverage and no output schema, return values are covered in the description, but required-field prerequisites, mode selection, and the interrelationship of idempotency with the non-idempotent annotation are left unaddressed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Ten parameters at 60% schema coverage; the description adds only the loose notion of 'draft or with line items', which maps indirectly to order_status and sales_order_lines. It does not clarify required fields (order_status, order_date, currency_code) or any of the four undocumented parameters.

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 ('Creates a sales order') and adds scope detail about draft-vs-line-item modes. It does not differentiate from siblings like create_purchase_order or create_product, but the core purpose is unambiguous.

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

Usage Guidelines2/5

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

No when-to-use guidance, no prerequisites (e.g. account/currency requirements), and no mention of alternatives such as create_purchase_order. The only hint is the implicit 'draft needs no lines' mode, which is not framed as guidance.

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.