Rank models by metric
top_modelsRank device MODELS by any battery metric, aggregating across every device
of that model. This is the tool for 'which phone model has the best battery
life', 'which models charge fastest', 'which run hottest' — questions that
would otherwise need one model_summary call per model.
Ordering is by the per-model MEDIAN of the metric (outlier-resistant); the
mean is returned alongside. Use brand to rank within one manufacturer and
min_devices to require a minimum sample size.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| brand | No | Optional lowercase brand filter. When omitted, devices from any brand are ranked together. | |
| limit | No | Number of devices to return, 1..100. | |
| order | No | 'desc' (default) ranks the highest values first, 'asc' the lowest. Pick the direction that matches the question: fastest charging is ac_charge_hours + asc; longest battery life is discharge_hours + desc. | desc |
| metric | Yes | Which battery metric to rank on. One of: 'temperature_c' (mean battery temperature, C), 'max_temperature_c' / 'min_temperature_c' (hottest / coldest ever seen, C), 'battery_level_pct' (mean charge level, 0-100), 'discharge_hours' (hours to drain a full 100% - HIGHER means longer battery life), 'ac_charge_hours' / 'usb_charge_hours' / 'wireless_charge_hours' (hours to charge a full 100% on that source - LOWER means faster charging), 'awake_ratio' (fraction of time awake / screen-on, 0..1), 'snapshot_count' (how much data the device contributed), 'uptime_hours' (longest single uptime between reboots). | |
| min_devices | No | Ignore models backed by fewer devices than this. Defaults to 3 so a single outlier phone cannot win a ranking. Raise it for more robust comparisons. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |