Skip to main content
Glama

create_sales_order

Create a new sales order, updating inventory, transactions, and customer totals in a single transaction. Supports confirm and idempotency validation.

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": {
      "farmId": "<farmId>",
      "items": "<items>"
    },
    "name": "create_sales_order"
  }
}

Input Schema

NameRequiredDescriptionDefault
taxNoTax amount (>= 0, default 0)
itemsYesList of order line items
notesNoOptional order notes (max 2000 chars)
farmIdYesThe unique farm ID
statusNoOrder status (default Pending)
confirmNoSet to true to commit, false for dry-run preview
shippingNoShipping cost (>= 0, default 0)
orderDateNoOrder date in YYYY-MM-DD format (defaults to today UTC)
customerIdNoExisting customer ID
fulfillmentNoFulfillment method (default ship)
newCustomerNo
customerEmailNoExisting customer email
paymentStatusNoPayment status (default unpaid)
idempotencyKeyNoUnique request idempotency key
trackingNumberNoREJECTED: Do not provide trackingNumber.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.6/5.0
Behavior4/5

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

The description discloses a genuinely useful behavioral trait beyond annotations: the operation updates inventory, transactions, and customer totals in a single atomic transaction. This is valuable mutation context the annotations (only readOnly/destructive/idempotent hints) don't carry. It stops short of detailing the confirm dry-run workflow or permission/validation failure behavior.

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, front-loaded with the core action and the key side-effect/atomicity fact. Nothing extraneous.

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 15-param nested mutation tool with no output schema, the description plus rich schema coverage and annotations covers most of what an agent needs. It could better surface the confirm dry-run workflow and the customer-identity selection rule, but overall it is sufficient.

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 description coverage is 93%, so the schema already documents nearly all params. The description adds only a light gloss ('confirm and idempotency validation') without explaining the confirm=true commit vs confirm=false preview semantics or the customerId/customerEmail vs newCustomer choice. Baseline 3 is appropriate.

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 ('Create a new sales order') and adds useful scope: updating inventory, transactions, and customer totals atomically. It's clear what the tool does but doesn't distinguish itself from siblings like create_production_order or create_supplier_shipment.

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?

There is no explicit guidance on when to use this versus alternatives or prerequisites (e.g., existing customer vs newCustomer, when to supply idempotencyKey). The phrase 'Supports confirm and idempotency validation' hints at a dry-run workflow but never states when or how to use it, leaving it to the schema to clarify.

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