run_shopifyql_query
Execute ShopifyQL analytics queries on store data and return results as an ASCII table or raw JSON payload.
Instructions
Run a ShopifyQL query against the store and return the result as a rendered ASCII table. ShopifyQL is Shopify's SQL-like analytics language. Examples: 'FROM sales SHOW total_sales BY day SINCE -30d TIMESERIES', 'FROM products SHOW product_title, quantity_sold BY product_id SINCE -7d ORDER BY quantity_sold DESC LIMIT 10'.
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": {
"query": "<query>"
},
"name": "run_shopifyql_query"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | ShopifyQL query string. Example: 'FROM sales SHOW total_sales, gross_sales BY day SINCE -30d TIMESERIES' | |
| raw | No | Return the raw unformatted JSON payload instead of a rendered table. |