Skip to main content
Glama

query_stuck_wakelock_rate

Read-only

Query daily stuck background wakelock rates and distinct user counts to identify battery-drain issues where users held a PowerManager wakelock over one hour.

Instructions

Query the stuck background wakelock rate: stuckBgWakelockRate (share of distinct users that held a PowerManager wakelock in the background for more than one hour) plus distinctUsers. Another battery-drain metric, counted over users doing any work on the device. Ask for stuckBgWakelockRate7dUserWeighted or stuckBgWakelockRate28dUserWeighted in metrics for rolling averages. Daily aggregation only.

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": {
      "start_date": "<start_date>",
      "end_date": "<end_date>"
    },
    "name": "query_stuck_wakelock_rate"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMax rows to return (default: 50)
filterNoAIP-160 filter over dimensions, e.g. "versionCode = 415"
metricsNoMetrics to fetch (default: stuckBgWakelockRate, distinctUsers)
end_dateYesEnd date (inclusive) as YYYY-MM-DD, e.g. '2026-08-13'
dimensionsNoBreak the metrics down by these dimensions, e.g. ['versionCode','deviceModel']
start_dateYesStart date (inclusive) as YYYY-MM-DD, e.g. '2026-08-01'
package_nameNoApp package name, e.g. 'com.acme.app' (defaults to GOOGLE_PLAY_PACKAGE_NAME)
aggregation_periodNoAggregation granularity — this metric set only supports DAILY

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.4.0
    • removedInput schema / additionalProperties
      Removed value: -false
  2. Addedv0.3.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already establish readOnlyHint and openWorldHint, so the bar is lower, and the description still adds real behavioral context: the metric's denominator population ('counted over users doing any work on the device') and the hard constraint that only DAILY aggregation is supported. It does not discuss result size, latency, or freshness, which leaves minor gaps.

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 sentences, front-loaded with the metric name and its plain-language definition, with the constraint ('Daily aggregation only') placed last as a closing rule. The parenthetical definition and the 'plus distinctUsers' clause are dense but each carries information; nothing is 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?

For a filtered time-series query with 8 fully documented parameters and no output schema, the description supplies what the schema cannot: metric semantics, the counted population, and the rolling-average metric names. Dimension breakdown, limits, and filter syntax are left entirely to the schema, which is acceptable given 100% coverage.

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 description coverage is 100%, so a baseline of 3 applies, but the description adds meaning the schema lacks: it names the rolling-average metric variants (stuckBgWakelockRate7dUserWeighted, stuckBgWakelockRate28dUserWeighted) that are valid values for the metrics array, and it reinforces that the aggregation_period enum is limited to DAILY.

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 ('Query the stuck background wakelock rate') and then defines the metric precisely, including the threshold (>1 hour held in background) and companion metric (distinctUsers). It positions itself only loosely against siblings by calling itself 'another battery-drain metric', so an agent must infer the boundary with query_excessive_wakeup_rate or query_lmk_rate rather than being told.

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?

Gives in-tool usage guidance ('Daily aggregation only', and to request stuckBgWakelockRate7dUserWeighted/28dUserWeighted for rolling averages), but never says when to choose this tool over the other vitals metrics or what conditions make the metric meaningful. Usage is implied by the metric definition rather than stated.

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