Skip to main content
Glama

adb_battery_drain

Measure Android battery drain over a set duration to calculate mA draw, mW consumption, and estimated percentage per hour, helping profile the power impact of specific operations.

Instructions

Measure battery drain rate over a specified duration. Takes initial and final readings and calculates mA draw, mW power consumption, and estimated percentage per hour. Useful for profiling power impact of specific operations.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "adb_battery_drain"
  }
}

Input Schema

NameRequiredDescriptionDefault
deviceNoDevice serial
durationMsNoMeasurement duration in ms (3s-60s, default 10s)
packageNameNoIf specified, show battery stats for this package (requires root for detailed stats)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.1.6
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. Changed1 schema field changedv1.1.3
    • removedInput schema / additionalProperties
      Removed value: -false
  3. First observedv1.1.1

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It usefully discloses the measurement mechanism (initial and final readings, then calculation), which implies the call blocks for the sampling duration, but it never says the call is read-only, that the device must remain idle for accurate results, or that packageName detailed stats require root (only the schema mentions root).

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?

Three short sentences: purpose, outputs, use case — well front-loaded with no filler. The closing sentence is slightly generic but still informative rather than redundant.

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?

There is no output schema, and the description compensates by naming the returned metrics. For a zero-required-param, moderately complex sampling tool, the main missing element is the blocking/idle-device caveat rather than anything about inputs or returns.

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 all three parameters are already documented with ranges and defaults. The description references duration and implicitly the target of profiling, but adds no syntax or format detail beyond the schema, so the baseline of 3 applies.

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

Purpose4/5

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

States a specific verb and resource ('Measure battery drain rate') and further specifies the computed metrics (mA draw, mW power, %/hour). An agent can distinguish this from adb_battery, which returns instantaneous battery state, though the description never names that sibling explicitly.

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?

'Useful for profiling power impact of specific operations' implies when to reach for it, but there are no explicit exclusions or pointers to alternatives like adb_battery, adb_top, or adb_perf_snapshot for lighter-weight sampling. Usage context is implied rather than stated.

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

Deploy Server

Other Tools