Skip to main content
Glama

BatterySnap

Rank devices by metric

top_devices
Read-onlyIdempotent

Rank INDIVIDUAL devices by any battery metric — the general-purpose leaderboard. Use it for 'which phones run hottest / last longest / charge fastest', optionally narrowed to one brand and/or model. Returns at most limit rows, so it answers superlative questions in a single small call instead of enumerating the fleet.

Ranking is over each device's own lifetime aggregate. Pair the metric with the right order: e.g. hottest = temperature_c + desc, fastest AC charging = ac_charge_hours + asc, best battery life = discharge_hours + desc.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
brandNoOptional lowercase brand filter. When omitted, devices from any brand are ranked together.
limitNoNumber of devices to return, 1..100.
modelNoOptional model filter — matches resolved street name or raw Build.MODEL, case-insensitive. When omitted, no model filter applies.
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).
min_snapshotsNoIgnore devices with fewer snapshots than this. Defaults to 100, which filters out barely-sampled devices whose averages are meaningless. Lower it only when a query returns too few rows.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint/idempotentHint/openWorldHint=false, so safety is covered. The description adds real behavioral context beyond that: ranking is computed over each device's lifetime aggregate, and the call returns at most `limit` rows rather than enumerating the fleet.

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

Conciseness5/5

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

Three short paragraphs, each with a job: what it is, when to use it, and how to combine metric with order. Front-loaded with the core purpose and no filler.

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?

With an output schema present, return-format explanation is unnecessary, and the description covers the remaining ambiguities an agent needs: scope (individual devices), filter semantics, min_snapshots sampling caveat, and metric/order combination.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3. The description still adds semantic value by teaching the metric+order pairing (hottest = temperature_c + desc, fastest = ac_charge_hours + asc), which is the main source of wrong-invocation risk and is not fully spelled out as a rule in the schema.

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+resource ('Rank INDIVIDUAL devices by any battery metric') and positions itself as 'the general-purpose leaderboard'. The word INDIVIDUAL distinguishes it from the model-level sibling top_models, and 'top_devices' vs 'top_devices_by_uptime'/'top_devices_by_live_uptime' is differentiated by 'any battery metric'.

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

Usage Guidelines4/5

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

Gives concrete triggering questions ('which phones run hottest / last longest / charge fastest') and notes the optional brand/model narrowing. It does not explicitly name when to prefer a sibling (e.g. top_devices_by_uptime or device_ranking), so it stops short of full routing guidance.

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