Skip to main content
Glama

query_excessive_wakeup_rate

Read-only

Query excessive AlarmManager wakeup rates and distinct users to pinpoint battery-draining background activity in your Android app.

Instructions

Query the excessive wakeup rate: excessiveWakeupRate (share of distinct users that had more than 10 AlarmManager wakeups per hour) plus distinctUsers. This is a battery-drain metric and counts users doing background work, not just foreground usage. Ask for excessiveWakeupRate7dUserWeighted or excessiveWakeupRate28dUserWeighted 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_excessive_wakeup_rate"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMax rows to return (default: 50)
filterNoAIP-160 filter over dimensions, e.g. "versionCode = 415"
metricsNoMetrics to fetch (default: excessiveWakeupRate, 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

A4.2/5.0
Behavior4/5

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

Annotations only declare readOnlyHint and openWorldHint, so the description carries most of the load and does well: it discloses that the metric counts users doing background work, not just foreground usage, and that aggregation is restricted to daily. Remaining gaps are minor – no mention of row limits or how sparse dimensions affect results.

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 sentences, each doing work: definition with threshold, interpretation caveat, then metric-variant and aggregation constraints. Front-loaded with the metric name and value, no filler.

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 an 8-parameter analytics query with no output schema and thin annotations, the description covers metric meaning, defaults, rolling-average alternatives, and the aggregation constraint. It stops short of describing output shape or dimension/filter interactions, but an agent has enough to call it correctly.

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 coverage is 100%, so every parameter is already documented, including the DAILY-only enum and metric defaults. The description reinforces the metrics default and the rolling-average variants, which adds marginal value but largely restates what the schema states.

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 (query) and names the exact metric, then defines it operationally: 'share of distinct users that had more than 10 AlarmManager wakeups per hour' plus distinctUsers. The metric definition alone separates it from siblings like query_stuck_wakelock_rate without needing to name them.

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 routing guidance within the tool: use excessiveWakeupRate7dUserWeighted or excessiveWakeupRate28dUserWeighted in metrics for rolling averages, and notes that only DAILY aggregation is supported. It does not say when to choose this metric over other vitals tools, but the metric-level guidance is clear and actionable.

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