Skip to main content
Glama

BatterySnap

Rank models by metric

top_models
Read-onlyIdempotent

Rank 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. Pair the metric with the right order: hottest = temperature_c + desc, fastest AC charging = ac_charge_hours + asc, best battery life = discharge_hours + desc. To compare phones the user names, call model_summary for each of them instead.

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. country / continent rank the models as they behave in one region (e.g. heat in hot climates).

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": {
      "metric": "<metric>"
    },
    "name": "top_models"
  }
}

Input Schema

NameRequiredDescriptionDefault
brandNoOptional lowercase brand filter. When omitted, devices from any brand are ranked together.
limitNoNumber of devices to return, 1..100.
orderNo'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
metricYesWhich 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).
countryNoOptional ISO 3166 alpha-2 country code (e.g. 'FR', 'IN', 'US'), case-insensitive. Keeps only devices whose time zone belongs to that country. The region comes from the phone's time-zone setting, not GPS / IP.
continentNoOptional continent. Keeps only devices whose time zone lies there. Combine with `country` for an intersection.
min_devicesNoIgnore 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. Raised to at least 5 when a region filter is set.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed14 schema fields changed
    • removedInput schema / properties / brand / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedInput schema / properties / brand / default
      Removed value: -null
    • addedInput schema / properties / brand / type
      Added value: +"string"
    • removedInput schema / properties / continent / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedInput schema / properties / continent / default
      Removed value: -null
    • changedInput schema / properties / continent / description
      Previous value: -"Optional continent, case-insensitive: 'Africa', 'Antarctica', 'Asia', 'Europe', 'North America', 'Oceania' or 'South America'. Keeps only devices whose time zone lies there. Combine with `country` for an intersection."New value: +"Optional continent. Keeps only devices whose time zone lies there. Combine with `country` for an intersection."
    • addedInput schema / properties / continent / enum
      Added value: +[
      +  "Africa",
      +  "Antarctica",
      +  "Asia",
      +  "Europe",
      +  "North America",
      +  "Oceania",
      +  "South America"
      +]
    • addedInput schema / properties / continent / type
      Added value: +"string"
    • removedInput schema / properties / country / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedInput schema / properties / country / default
      Removed value: -null
    • addedInput schema / properties / country / type
      Added value: +"string"
    • addedInput schema / properties / metric / enum
      Added value: +[
      +  "temperature_c",
      +  "max_temperature_c",
      +  "min_temperature_c",
      +  "battery_level_pct",
      +  "discharge_hours",
      +  "ac_charge_hours",
      +  "usb_charge_hours",
      +  "wireless_charge_hours",
      +  "awake_ratio",
      +  "snapshot_count",
      +  "uptime_hours"
      +]
    • addedInput schema / properties / order / enum
      Added value: +[
      +  "asc",
      +  "desc"
      +]
    • removedInput schema / properties / order / pattern
      Removed value: -"^(asc|desc)$"
  2. Changed3 schema fields changed
    • addedInput schema / properties / continent
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Optional continent, case-insensitive: 'Africa', 'Antarctica', 'Asia', 'Europe', 'North America', 'Oceania' or 'South America'. Keeps only devices whose time zone lies there. Combine with `country` for an intersection."
      +}
    • addedInput schema / properties / country
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Optional ISO 3166 alpha-2 country code (e.g. 'FR', 'IN', 'US'), case-insensitive. Keeps only devices whose time zone belongs to that country. The region comes from the phone's time-zone setting, not GPS / IP."
      +}
    • changedInput schema / properties / min_devices / description
      Previous value: -"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."New value: +"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. Raised to at least 5 when a region filter is set."
  3. First observed

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint, idempotentHint, and a closed-world scope, so the safety profile is covered. The description adds genuinely non-structured behavior: ranking uses the per-model MEDIAN to resist outliers, with the mean returned alongside, which explains why results may differ from a naive average. The min_devices/region caveats it repeats are already in the schema, so it stops short of a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with purpose and use cases, then background mechanics, then alternatives — a sensible ordering. It runs long and duplicates the order/metric pairing advice already present in the schema, which is the main thing keeping it from a 5.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 7-parameter analytics tool, the description covers intent routing, aggregation semantics, filtering behavior, and the named-phone alternative, while an output schema and annotations already handle return shape and safety. Nothing an agent needs to call this correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so every parameter including the metric enum and order direction is already fully documented. The description restates the metric/order pairing guidance that the `order` and `metric` schema fields already contain, adding little meaning beyond the schema. Baseline 3 applies when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (rank) and resource (device models) with an explicit aggregation scope: 'aggregating across every device of that model.' It also distinguishes itself from the sibling `model_summary` by contrasting fleet-wide model ranking with per-model lookup, so an agent can choose without opening either schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives concrete question shapes this tool answers ('which phone model has the best battery life') and names the alternative path explicitly: 'To compare phones the user names, call `model_summary` for each of them instead.' It further routes parameter choice by intent (hottest → temperature_c + desc, fastest AC charging → ac_charge_hours + asc).

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources