metrics_breakdown
Splits one metric by dimension or category over a date range, returning ranked slices with summed revenue, units, counts and recomputed ratios.
Instructions
One metric split by by, category or distribution_center, over start to end (ISO dates, both included). slices holds each slice's name and value, largest first; at most 50 are returned, and truncated says whether there were more. Counts and money are summed over the days, and aov, return_rate and conversion_rate are recomputed from the slice's summed parts; a ratio is null when its denominator is 0. Ratios are fractions between 0 and 1, rounded to four places. orders, product_view_sessions and converted_sessions are distinct within the slice, and they and every ratio must not be summed across slices; a slice's aov is revenue per order in that slice. adds_up says whether the slices add up to the total, true only for revenue, units and returned_units. approximate is true for the session metrics over more than one day, because a session that crosses midnight is counted on both days. On contract v1 outputs only revenue, units, returned_units and return_rate can be split; call metrics_daily_totals for the others. includes_provisional is true when the range reaches restated_from, so the numbers may still change. Call metrics_freshness for the dates the data covers and the contract version.
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": {
"start": "<start>",
"end": "<end>",
"metric": "<metric>",
"by": "<by>"
},
"name": "metrics_breakdown"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| by | Yes | ||
| end | Yes | ||
| start | Yes | ||
| metric | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| by | Yes | ||
| metric | Yes | ||
| slices | Yes | ||
| adds_up | Yes | ||
| truncated | Yes | ||
| approximate | Yes | ||
| restated_from | Yes | ||
| includes_provisional | Yes |