Skip to main content
Glama

Query sales orders

query_sales_orders
Read-only

Returns one store's sales orders with all order items in descending purchase time. Uses a UTC start-inclusive, end-exclusive window of at most 31 days. Excludes canceled, non-Amazon and replacement orders. SKU and promotion filters select whole orders. The time window always filters purchasedAt (order purchase time), never refund or return event time. REFUND means the order currently has a refund flag in the latest synchronized data; it does not necessarily mean a full refund or a physical return. An order purchased in July and refunded in September matches a July purchase window with REFUND, but not a September purchase window. Historical results may change after later refunds are synchronized. This endpoint cannot answer which refunds or returns occurred during a period. Amounts may be estimated; amounts after promotion are not settlement proceeds. Missing prices or order currency produce null amounts. Use this endpoint for individual orders and their items; use Sales reports for aggregated sales metrics and Profit reports for profit, refunds and costs. Order amount sums are not guaranteed to reconcile with report sales or netSales. Returns no total count. Offset pagination is not a snapshot; deduplicate by storeId and orderId when collecting changing data.

Input Schema

NameRequiredDescriptionDefault
skusNoExact seller SKUs, at most 100. Any matching item selects the whole order; all order items are returned.
endAtYesExclusive purchase time in UTC yyyy-MM-dd'T'HH:mm:ss'Z' format. Must be after startAt and at most 31 days later. Applies to purchasedAt even when statuses includes REFUND; not a refund or return time boundary.
limitNoMaximum number of items to return. Defaults to 100 and cannot exceed 100.
offsetNoZero-based pagination offset.
startAtYesInclusive purchase time in UTC yyyy-MM-dd'T'HH:mm:ss'Z' format, for example 2024-04-05T23:30:00Z. Whole seconds only. Applies to purchasedAt even when statuses includes REFUND; not a refund or return time boundary.
storeIdYesStore ID from the Stores API, formatted as sellerId:marketplaceId.
orderIdsNoExact order IDs, at most 100. The purchase time window still applies.
statusesNoOptional business statuses: PENDING, UNSHIPPED, SHIPPED, REFUND. Leave empty for all visible statuses. UNSHIPPED applies to merchant fulfillment. The time window always filters purchasedAt (order purchase time), never refund or return event time. REFUND means the order currently has a refund flag in the latest synchronized data; it does not necessarily mean a full refund or a physical return. An order purchased in July and refunded in September matches a July purchase window with REFUND, but not a September purchase window. Historical results may change after later refunds are synchronized. This endpoint cannot answer which refunds or returns occurred during a period.
fulfillmentChannelNoOptional fulfillment channel: AFN (Amazon) or MFN (merchant). Leave empty to include both.
hasPromotionDiscountNoOptional true or false. True selects orders with any nonzero recorded item promotion discount; false selects orders without such items. This does not indicate promotion campaign membership. SKU and discount filters are evaluated independently across all items in an order.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Goes well beyond readOnly/destructive annotations by disclosing exclusions (canceled, non-Amazon, replacement orders), the exact time-window semantics, the REFUND caveat, historical mutability, estimated amounts, nullable amounts, absence of a total count, and non-snapshot offset pagination.

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?

Although dense, it is front-loaded with the core behavior and structured around scope, time semantics, exclusions, limitations, and alternatives. Every sentence carries operational meaning for calling or interpreting the tool correctly.

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?

Given ten parameters, an output schema, annotations, and sibling tools, the description supplies everything an agent needs: selection scope, exclusion rules, time interpretation, refund limitations, amount caveats, pagination behavior, and sibling routing.

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 would be 3, but the description adds cross-cutting meaning: SKU and promotion filters select whole orders, the window always applies to purchasedAt rather than refund/return events, and the filters are evaluated independently. Those clarifications add genuine value beyond the schema.

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?

States a precise verb and resource: returns one store's sales orders with all order items. It explicitly distinguishes this from Sales reports and Profit reports, so an agent can select it over siblings without opening schemas.

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?

Gives explicit guidance on when to use this tool (individual orders and items) versus Sales reports (aggregated metrics) and Profit reports (profit, refunds, costs). It also states the important limitation that this endpoint cannot answer which refunds or returns occurred during a period.

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