Skip to main content
Glama

BatterySnap

Find devices by model

devices
Read-onlyIdempotent

Return the list of individual physical devices matching one or more (brand, model) pairs for which we have battery statistics. Each entry in the returned list describes ONE specific device (identified by its own device_uid) and the metrics on that entry are aggregates computed only from THAT device's own snapshot history — they are not aggregated across devices. Two devices of the same brand and model will appear as two separate entries with their own independent metrics.

Each entry has: brand (lowercase brand, e.g. 'samsung'), device_uid (this device's id, for device_summary / device_ranking), url (public page with the device's battery history), model (model name, e.g. 'Galaxy S23'), raw_model (Build.MODEL code, e.g. 'SM-S911B'), snapshot_count (number of battery readings, more = more reliable), battery_level_pct (average charge level, %), temperature_c (average battery temperature, C), min_temperature_c (coldest battery temperature, C), max_temperature_c (hottest battery temperature, C), awake_ratio (fraction of time awake / screen-on, 0..1), discharge_hours (discharge time / battery life, hours per 100%, higher = longer), ac_charge_hours (AC charge time, hours per 100%, lower = faster), usb_charge_hours (USB charge time, hours per 100%, lower = faster), wireless_charge_hours (wireless charge time, hours per 100%, lower = faster), android_api_level (Android SDK level, e.g. 34 = Android 14).

Each pair's model is matched case-insensitively against either the resolved street name (e.g. 'Galaxy S23') or the raw Android model identifier (e.g. 'SM-S911B'). Pass fields to keep only specific attributes per device and avoid bloated responses.

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": {
      "pairs": "<pairs>"
    },
    "name": "devices"
  }
}

Input Schema

NameRequiredDescriptionDefault
pairsYesOne or more {brand, model} pairs to look up. Each pair fetches devices matching that brand and model.
fieldsNoAttributes to keep in each returned entry, to shrink the response. Omit (or pass an empty list) for all of them. Names: brand (lowercase brand, e.g. 'samsung'), device_uid (this device's id, for device_summary / device_ranking), url (public page with the device's battery history), model (model name, e.g. 'Galaxy S23'), raw_model (Build.MODEL code, e.g. 'SM-S911B'), snapshot_count (number of battery readings, more = more reliable), battery_level_pct (average charge level, %), temperature_c (average battery temperature, C), min_temperature_c (coldest battery temperature, C), max_temperature_c (hottest battery temperature, C), awake_ratio (fraction of time awake / screen-on, 0..1), discharge_hours (discharge time / battery life, hours per 100%, higher = longer), ac_charge_hours (AC charge time, hours per 100%, lower = faster), usb_charge_hours (USB charge time, hours per 100%, lower = faster), wireless_charge_hours (wireless charge time, hours per 100%, lower = faster), android_api_level (Android SDK level, e.g. 34 = Android 14).

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed25 schema fields changed
    • removedInput schema / properties / fields / anyOf
      Removed value: -[
      -  {
      -    "items": {
      -      "type": "string"
      -    },
      -    "type": "array"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedInput schema / properties / fields / default
      Removed value: -null
    • changedInput schema / properties / fields / description
      Previous value: -"Optional whitelist of attribute names to keep in each returned entry, used to shrink the response. When omitted or empty, all attributes documented in the output schema are returned. Unknown names are silently ignored."New value: +"Attributes to keep in each returned entry, to shrink the response. Omit (or pass an empty list) for all of them. Names: brand (lowercase brand, e.g. 'samsung'), device_uid (this device's id, for device_summary / device_ranking), url (public page with the device's battery history), model (model name, e.g. 'Galaxy S23'), raw_model (Build.MODEL code, e.g. 'SM-S911B'), snapshot_count (number of battery readings, more = more reliable), battery_level_pct (average charge level, %), temperature_c (average battery temperature, C), min_temperature_c (coldest battery temperature, C), max_temperature_c (hottest battery temperature, C), awake_ratio (fraction of time awake / screen-on, 0..1), discharge_hours (discharge time / battery life, hours per 100%, higher = longer), ac_charge_hours (AC charge time, hours per 100%, lower = faster), usb_charge_hours (USB charge time, hours per 100%, lower = faster), wireless_charge_hours (wireless charge time, hours per 100%, lower = faster), android_api_level (Android SDK level, e.g. 34 = Android 14)."
    • addedInput schema / properties / fields / items
      Added value: +{
      +  "enum": [
      +    "brand",
      +    "device_uid",
      +    "url",
      +    "model",
      +    "raw_model",
      +    "snapshot_count",
      +    "battery_level_pct",
      +    "temperature_c",
      +    "min_temperature_c",
      +    "max_temperature_c",
      +    "awake_ratio",
      +    "discharge_hours",
      +    "ac_charge_hours",
      +    "usb_charge_hours",
      +    "wireless_charge_hours",
      +    "android_api_level"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / fields / type
      Added value: +"array"
    • addedOutput schema / properties / result / items / properties / ac_charge_hours
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "number"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Average hours to charge a full 100% on an AC wall charger. Lower is faster."
      +}
    • removedOutput schema / properties / result / items / properties / avg_ac_charge_hours_per_full_charge
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "type": "number"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ],
      -  "description": "Average hours to charge a full 100% on an AC wall charger. Lower is faster."
      -}
    • removedOutput schema / properties / result / items / properties / avg_battery_level_percent
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "type": "number"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ],
      -  "description": "Mean battery charge level across all snapshots, in percent (normally 0-100; may be outside that range for corrupted samples). Null if no level samples."
      -}
    • removedOutput schema / properties / result / items / properties / avg_battery_temperature_celsius
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "type": "number"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ],
      -  "description": "Mean battery temperature in Celsius, across all snapshots. Null if no temperature samples."
      -}
    • removedOutput schema / properties / result / items / properties / avg_discharge_hours_per_full_charge
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "type": "number"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ],
      -  "description": "Average hours to discharge a full 100% while running on battery (e.g. 40 means the battery lasts ~40 h from full to empty at this device's usage). Higher is better battery life."
      -}
    • removedOutput schema / properties / result / items / properties / avg_usb_charge_hours_per_full_charge
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "type": "number"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ],
      -  "description": "Average hours to charge a full 100% over USB (e.g. a computer port). Typically slower than AC."
      -}
    • removedOutput schema / properties / result / items / properties / avg_wireless_charge_hours_per_full_charge
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "type": "number"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ],
      -  "description": "Average hours to charge a full 100% wirelessly. Null if the device never charged wirelessly."
      -}
    • addedOutput schema / properties / result / items / properties / awake_ratio
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "number"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Fraction of observed time the device was awake / screen-on (normally between 0 and 1)."
      +}
    • removedOutput schema / properties / result / items / properties / awake_time_fraction
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "type": "number"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ],
      -  "description": "Fraction of observed time the device was awake / screen-on (normally between 0 and 1)."
      -}
    • addedOutput schema / properties / result / items / properties / battery_level_pct
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "number"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Mean battery charge level across all snapshots, in percent (normally 0-100; may be outside that range for corrupted samples). Null if no level samples."
      +}
    • addedOutput schema / properties / result / items / properties / discharge_hours
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "number"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Average hours to discharge a full 100% while running on battery (e.g. 40 means the battery lasts ~40 h from full to empty at this device's usage). Higher is better battery life."
      +}
    • removedOutput schema / properties / result / items / properties / max_battery_temperature_celsius
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "type": "number"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ],
      -  "description": "Hottest battery temperature in Celsius observed across all snapshots for this device. Sustained high values are a battery-health concern. Null if no temperature samples."
      -}
    • addedOutput schema / properties / result / items / properties / max_temperature_c
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "number"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Hottest battery temperature in Celsius observed across all snapshots for this device. Sustained high values are a battery-health concern. Null if no temperature samples."
      +}
    • removedOutput schema / properties / result / items / properties / min_battery_temperature_celsius
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "type": "number"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ],
      -  "description": "Coldest battery temperature in Celsius observed across all snapshots for this device. Null if no temperature samples."
      -}
    • addedOutput schema / properties / result / items / properties / min_temperature_c
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "number"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Coldest battery temperature in Celsius observed across all snapshots for this device. Null if no temperature samples."
      +}
    • addedOutput schema / properties / result / items / properties / model
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Human-readable model name resolved for this device (e.g. 'Galaxy S23', 'Pixel 7a'). Null when the model could not be resolved from the raw Android identifiers."
      +}
    • removedOutput schema / properties / result / items / properties / street_name
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "type": "string"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ],
      -  "description": "Human-readable model name resolved for this device (e.g. 'Galaxy S23', 'Pixel 7a'). Null when the model could not be resolved from the raw Android identifiers."
      -}
    • addedOutput schema / properties / result / items / properties / temperature_c
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "number"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Mean battery temperature in Celsius, across all snapshots. Null if no temperature samples."
      +}
    • addedOutput schema / properties / result / items / properties / usb_charge_hours
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "number"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Average hours to charge a full 100% over USB (e.g. a computer port). Typically slower than AC."
      +}
    • addedOutput schema / properties / result / items / properties / wireless_charge_hours
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "number"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Average hours to charge a full 100% wirelessly. Null if the device never charged wirelessly."
      +}
  2. Changed1 schema field changed
    • changedOutput schema / properties / result / items / properties / snapshot_count / description
      Previous value: -"Approximate number of battery snapshots recorded for this device (one significant digit). Higher values mean the per-device aggregates are based on more samples and are more reliable."New value: +"Number of battery snapshots recorded for this device. Higher values mean the per-device aggregates are based on more samples and are more reliable."
  3. Changed3 schema fields changed
    • removedOutput schema / properties / result / items / properties / first_seen
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "type": "string"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ],
      -  "description": "ISO 8601 timestamp of the earliest battery snapshot recorded for this device. Null if unknown."
      -}
    • removedOutput schema / properties / result / items / properties / last_seen
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "type": "string"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ],
      -  "description": "ISO 8601 timestamp of the most recent battery snapshot recorded for this device. Null if unknown."
      -}
    • changedOutput schema / properties / result / items / properties / snapshot_count / description
      Previous value: -"Total number of battery snapshots recorded for this device. Higher values mean the per-device aggregates are based on more samples and are more reliable."New value: +"Approximate number of battery snapshots recorded for this device (one significant digit). Higher values mean the per-device aggregates are based on more samples and are more reliable."
  4. Changed3 schema fields changed
    • removedOutput schema / properties / result / items / properties / continent
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "type": "string"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ],
      -  "description": "Continent derived from the device's time zone: one of 'Africa', 'Antarctica', 'Asia', 'Europe', 'North America', 'Oceania', 'South America'. Null when unknown."
      -}
    • removedOutput schema / properties / result / items / properties / country
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "type": "string"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ],
      -  "description": "ISO 3166 alpha-2 country code derived from the device's time zone (e.g. 'FR' for Europe/Paris). It is where the phone's clock is set, not a GPS / IP location. Null when the zone names no place (UTC, GMT) or is unknown."
      -}
    • removedOutput schema / properties / result / items / properties / time_zone
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "type": "string"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ],
      -  "description": "IANA time zone identifier reported by the device (e.g. 'Europe/Paris', 'America/New_York'). Indicates the geographic region the device is operating in. Null when unknown."
      -}
  5. Changed2 schema fields changed
    • addedOutput schema / properties / result / items / properties / continent
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Continent derived from the device's time zone: one of 'Africa', 'Antarctica', 'Asia', 'Europe', 'North America', 'Oceania', 'South America'. Null when unknown."
      +}
    • addedOutput schema / properties / result / items / properties / country
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "ISO 3166 alpha-2 country code derived from the device's time zone (e.g. 'FR' for Europe/Paris). It is where the phone's clock is set, not a GPS / IP location. Null when the zone names no place (UTC, GMT) or is unknown."
      +}
  6. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already cover read-only, idempotent, closed-world, so the bar is lower, yet the description still adds real behavioral context: per-device aggregation semantics, the warning that two units of the same brand/model appear as separate entries, case-insensitive matching against both street name and Build.MODEL, and metric directionality (higher discharge_hours = longer, lower charge_hours = faster). It omits edge behavior such as empty results or result-set size, which keeps it below 5.

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

Conciseness3/5

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

The opening two sentences are well front-loaded and high value. But the 16-attribute catalogue is reproduced verbatim, character for character, in the `fields` enum description in the schema — a large redundant block that inflates the definition without adding information an agent can't get from structured data.

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

Completeness4/5

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

For a two-parameter lookup with an output schema, the definition is comfortably complete: granularity, matching rules, metric units and directions, and the projection parameter are all covered. The only redundancy is explaining return fields that the output schema already defines, and the only gap is unmatched-pair behavior.

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 baseline is 3, but the description earns extra credit by explaining why `fields` exists (shrink the response, avoid bloat) and by restating the matching rule for `model` across both identifier forms. The brand/model pair semantics and the 'omit or empty list for all' behavior are all clarified in prose as well as 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 and resource ('Return the list of individual physical devices matching ... (brand, model) pairs') and immediately pins the granularity: one entry per physical device, metrics computed only from that device's own history, not aggregated across devices. That granularity statement is exactly what separates it from aggregation siblings like model_summary or device_ranking, and the device_uid note explicitly routes to device_summary/device_ranking.

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

Usage Guidelines3/5

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

There is a concrete usage hint ('Pass `fields` to keep only specific attributes per device and avoid bloated responses') and an implicit workflow pointer (device_uid is 'for device_summary / device_ranking'). However, the description never says when to prefer this over model_summary or models, nor what to do when a pair returns nothing. Usage is implied rather than prescribed.

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