Skip to main content
Glama

List Sales Orders

get_sales_orders
Read-only

List sales orders — orders CUSTOMERS placed with this business (customer orders by default; in any language a customer's orders are sales orders, not purchase orders) for reconciliation / status reporting — e.g. to verify imported/pushed orders landed. OPEN ORDERS: in everyday speech "open" or "outstanding" sales orders means the ones not fulfilled yet — pass state=open (created through packed, ready to ship, awaiting pickup, backordered, partly shipped). state=closed is the finished ones (shipped, completed, canceled). There is no status named open. Filters (all optional, AND-combined): type (sales [default], sro); state (open, closed); status (one exact lifecycle status, e.g. created, approved, picking, shipped, completed, canceled; with state it must belong to that state — unknown values are rejected); partnerSearch (customer name); numberSearch (case-insensitive substring of the SO number OR of the linked channel order number — a Shopify order number like 154938 or an Amazon order id finds the SO it became, so try it before asking what a bare number refers to); sku (only SOs with a line for that exact SKU); createdFrom/createdTo (ISO 8601 bounds on the created date — historical imports are dated from their order date). Newest first. Paged: returns Total (pre-paging — the answer to "how many") plus the page; default 100, max 500. Each row is an order-level summary (customer, store, total, line count, lifecycle dates) — not line detail. A client-pinned token sees only its own client's SOs; an operator token sees the whole tenant's.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_sales_orders"
  }
}

Input Schema

NameRequiredDescriptionDefault
skuNoReturn only SOs containing a line for this exact SKU (case-insensitive).
typeNoDocument type: sales (default), sro.
limitNoPage size (default 100, max 500).
stateNoGrouped lifecycle filter. open = not fulfilled yet (created, approved, issued, waitingApproval, waitingbackorder, backorder, pending, picking, picked, packing, packed, readyForShipping, waitingPersonalPickup, shipping) — what "open sales orders" means in everyday speech. closed = finished (shipped, completed, canceled). Omit for both.
offsetNoZero-based offset for paging (default 0).
statusNoExact lifecycle status, one value (e.g. approved, shipped, completed). For "open orders" use state=open instead. Omit for all statuses.
createdToNoOnly SOs created on/before this ISO 8601 instant, or through the end of this local day for a bare YYYY-MM-DD.
createdFromNoOnly SOs created on/after this ISO 8601 instant, or from the start of this local day for a bare YYYY-MM-DD.
numberSearchNoCase-insensitive substring match on the SO number or on the linked channel order number (Shopify order number, Amazon order id).
partnerSearchNoCase-insensitive substring match on the customer name.

Output Schema

NameRequiredDescriptionDefault
okNo
limitNo
totalNo
offsetNo
ordersNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already cover the read-only, non-destructive, closed-world profile, and the description adds real behavioral context beyond them: newest-first ordering, Total reflecting pre-paging count ("the answer to 'how many'"), 100/500 paging defaults, rows being order-level summaries rather than line detail, and token-scope visibility (client-pinned vs operator tenant-wide). The paging size details duplicate the schema slightly, which keeps it from a 5.

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?

It is dense but front-loaded: identity and use case first, then the open/closed trap, then filters, then paging and row shape. Almost every sentence carries information, though the parenthetical about what counts as a sales order "in any language" is mildly redundant and could be trimmed.

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

Completeness5/5

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

For a 10-parameter, all-optional filter tool with an output schema, the description covers everything an agent needs to call it correctly: filter combination logic (AND), state semantics, paging limits, total count, row granularity, and token scoping. No material gap remains.

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 100%, so the baseline is 3; the description earns above that by adding semantics the schema does not: numberSearch matches Shopify order numbers or Amazon order ids and finds the SO they became, createdFrom/createdTo treat historical imports by their order date, and the open/closed groupings are spelled out in business terms rather than enum lists.

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 ("List sales orders") and immediately disambiguates the concept: customer-placed orders, not purchase orders. It also separates the list view (order-level summary) from line detail, so an agent can tell it apart from single-order retrieval tools without opening a schema.

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 names concrete use cases (reconciliation, status reporting, verifying imported/pushed orders landed) and gives explicit negative guidance: "There is no status named open" and "For 'open orders' use state=open instead." It also prescribes a search-first strategy for bare numbers (try numberSearch before asking what the number refers to), which routes the agent's behavior rather than leaving it to inference.

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