shopify_custom_query
Execute custom ShopifyQL queries to analyze sales, orders, customers, sessions, and marketing data when pre-built tools don't meet specific metric requirements.
Instructions
Run a custom ShopifyQL query for advanced analytics. Use this when the pre-built tools don't cover your specific metric needs. Available tables: sales, orders, customers, sessions, shop_campaign_insights.
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": "shopify_custom_query"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | A valid ShopifyQL query. Example: FROM sales SHOW total_sales, net_sales GROUP BY product_type SINCE -30d ORDER BY total_sales DESC LIMIT 10 |