-
Notifications
You must be signed in to change notification settings - Fork 61
[Request] Pagination for orders #15
Description
Feature Request: Add Pagination Support to get-orders
Hi,
I'm using shopify-mcp for order analytics and running into a limitation with get-orders.
Problem
get-orders currently supports limit, but not pagination.
For larger values like 200 or 250, the response becomes too large for the MCP client/tooling path and gets truncated. When that happens:
- the
orderspayload is incomplete - some
lineItemsare missing - downstream analysis becomes unreliable
A concrete example is trying to calculate the most sold product from the last 250 orders. The fetch succeeds, but the returned order data is incomplete due to truncation, so the result cannot be trusted.
Why This Matters
Many analytics use cases require more than a small one-shot batch, especially when aggregating:
- top-selling products
- units sold by SKU
- product performance over a date range
- repeat order patterns
For these use cases, lineItems need to be complete. A smaller paginated response is much more useful than a larger truncated one.
Requested Feature
Please add pagination support to get-orders, ideally with cursor-based pagination similar to Shopify Admin GraphQL.
Example interface:
get-orders({
first: 50,
after?: "cursor",
status?: "any"
})