query_metric_snapshots
Query recorded metric snapshots as a time series. Use to answer 'show me all CVR snapshots for UK over the last 6 months', 'how has ROAS evolved by month?', etc. Returns canonical snapshot data (matches the dashboard and monthly digest exactly) plus a charts array of ready-to-render line chart specs (one per metric; multi-series when the query spans multiple stores or segments). DEFAULT TO RENDERING THE CHART when the LLM is asked to show a metric over time — these are the SAME numbers the merchant sees on /dashboard/metrics. Call with no args (or just list: true) to get the full registry of canonical metric keys.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| list | No | If true, returns the metric registry (canonical keys, units, descriptions). Use this when you don't know which metrics are available. | |
| limit | No | Max snapshots to return (default 100, max 500) | |
| store | No | Filter to a specific store/region key. Accepts short form ('acme-store') or full domain ('acme-store.myshopify.com') — both normalize to the short form used in storage. | |
| metric | No | Canonical metric key. Omit to return snapshots across all metrics (filtered by other params). | |
| source | No | Filter by source ('shopify', 'ga4', 'tw', etc.) | |
| _offset | No | Pagination offset. If a response includes _pagination.hasMore=true, use _offset to fetch the next page. | |
| endDate | No | Only include snapshots whose periodStart is <= this date (YYYY-MM-DD) | |
| segment | No | Filter to a specific segment | |
| insightId | No | Only snapshots linked to this insight | |
| startDate | No | Only include snapshots whose periodEnd is >= this date (YYYY-MM-DD) | |
| confidence | No | Filter by confidence. Pass 'high' / 'medium' / 'low' to match exactly, or 'minHigh' / 'minMedium' to require AT LEAST that level (treats null as 'high'). Useful for benchmarks where you only want trustworthy values. | |
| periodKind | No | Filter by period anchoring. 'calendar' = discrete buckets only; 'rolling' = trailing windows only. Mixing the two in a single time series silently distorts trends. | |
| periodLength | No | Filter by bucket size — combine with periodKind to e.g. fetch only calendar-month rows. |