Skip to main content
Glama

BatterySnap

Compare a device to its peers

device_ranking
Read-onlyIdempotent

Answer 'is MY phone normal?' — rank one device's metric against other devices of the same model AND against the whole fleet, in one call. Returns the device's value, its 1-based rank, its percentile, and the cohort median / mean / min / max for both cohorts.

Prefer this over fetching device_summary + model_summary and comparing by hand: it is a single call and gives the percentile directly. The model cohort is the meaningful one for 'is this device degraded'; the fleet cohort puts the model itself in context.

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": {
      "device_uid": "<device_uid>"
    },
    "name": "device_ranking"
  }
}

Input Schema

NameRequiredDescriptionDefault
metricNoWhich 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).discharge_hours
device_uidYesStable device UUID returned by `devices`, `top_devices` or the share flow.

Output Schema

NameRequiredDescriptionDefault
urlNoPublic BatterySnap page with this device's interactive battery history.
brandNoLowercase Android brand identifier.
fleetNoRank against every device in the fleet, all models mixed.
modelNoResolved model name (street name).
valueNoThis device's value for the metric.
metricNoThe metric that was ranked.
raw_modelNoRaw Build.MODEL identifier.
device_uidNoThe device that was ranked.
model_cohortNoRank against other devices of the SAME brand + model — the fair like-for-like comparison.
snapshot_countNoSnapshots behind this device's aggregate.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • 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"
      +]
  2. 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 and closed-world, so safety is covered; the description adds the interpretive context of what the two cohorts mean and that the percentile is computed directly. It does not discuss cost, cohort size thresholds (e.g. what happens for a rare model), or tie handling, which would be the remaining behavioral gaps.

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?

Front-loaded with the question it answers, then the return contents, then the routing rule, then the cohort interpretation. Every sentence carries distinct information and nothing is repeated from the schema.

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?

A read-only, two-parameter tool with full schema coverage, an output schema and rich annotations; the description covers purpose, return shape, alternatives and cohort interpretation. Nothing an agent needs in order to choose and call it 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% and the metric enum already documents each metric's meaning and direction (higher = longer battery life, lower = faster charging), so the schema carries the parameter burden. The description adds only the abstract notion of ranking 'one device's metric' and no extra syntax or constraint beyond the schema, so baseline 3 applies.

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 and resource: rank one device's metric against its model cohort and the whole fleet in a single call. It immediately distinguishes itself from device_summary and model_summary by naming them and explaining what combination it replaces.

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?

Explicitly says to prefer this over fetching device_summary + model_summary and comparing by hand, and gives the selection rule between its two cohorts (model cohort for 'is this device degraded', fleet cohort for putting the model in context). Both when-to-use and which-output-to-trust are covered.

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