Skip to main content
Glama

Create a sales order

create_sales_order

Draft a sales order for a customer in these books, for delivery and invoicing later. A line with an item and no unit_price is priced by the price rules exactly as on the website; a line nothing can price is REFUSED, never filled in at $0.00 — ask the user for the price. confirm: true opens it straight away, otherwise it is a draft. Usually queued for the account holder to approve (read staged). Nobody is invoiced or charged by this.

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": {
      "customer_id": "<customer_id>",
      "lines": "<lines>"
    },
    "name": "create_sales_order"
  }
}

Input Schema

NameRequiredDescriptionDefault
memoNo
linesYes
confirmNoOpen the order now instead of saving a draft.
entity_idNoAnother entity in the same books (ids from `list_entities`). Leave out to use the entity the person is working in.
tax_totalNoSales tax on the order, if known. Default 0.
order_dateNoISO date. Default today.
customer_idYesFrom `list_customers`.
customer_poNoThe customer's own purchase-order number.
expected_dateNoISO date the customer expects it.

Output Schema

NameRequiredDescriptionDefault
idNoThe created or updated record's id, when the write was applied rather than staged.
noteNoWhy the result was truncated, when it was.
stagedNoTRUE means nothing has changed yet — the write is queued in the account holder's Approvals queue in Seayora. Say it is waiting for approval; never report it as done.
draft_idNoThe staged proposal's id, when it was queued rather than performed.
truncatedNoPresent and true when the result was too large to return in full. Treat it as a partial answer.
total_availableNoHow many rows existed before truncation.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Annotations only declare the generic write profile (readOnlyHint=false, destructiveHint=false, idempotentHint=false). The description adds behavior annotations cannot express: automatic pricing by the same rules as the website, hard refusal rather than a $0.00 fallback, draft-vs-open semantics via `confirm`, and an approval queue the caller should inspect via `staged`.

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 and dense with zero filler; the riskiest behavior (refused, never $0.00) is emphasized. The compressed style produces a couple of terse fragments ('read `staged`') that cost a little clarity, and the approval-queue sentence is somewhat awkwardly placed.

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?

An output schema exists, so return values need no prose, and the mutation profile is covered. Given nine parameters, the description adequately covers the risky ones, though it is silent on `entity_id` (cross-entity booking) and `tax_total`, which matter for a multi-entity books product.

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 78%, so most parameters are already documented. The description goes beyond the schema's neutral 'Leave out to price the item by the price rules' by stating the consequence of an unpriceable line and the instruction to ask the user, which is the single most important semantic for `unit_price`/`item_id` combinations.

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 ('Draft a sales order for a customer in these books') and scopes the outcome ('for delivery and invoicing later'), which separates it cleanly from get_sales_order, list_sales_orders, and create_purchase_order without needing to name them.

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?

It gives concrete when-to guidance: pass `confirm: true` to open immediately, otherwise a draft; a line that cannot be priced must be sent back to the user rather than defaulted. It does not explicitly route the agent to siblings for actual billing, though 'Nobody is invoiced or charged by this' implies a follow-up tool exists.

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