Skip to main content
Glama

query_memory_usage

Read-only

Query app memory usage percentiles (anonymous RSS plus swap) and distinct users by day to analyze Android vitals memory trends and break results down by process or app state.

Instructions

Query overall app memory usage percentiles (anonymous RSS plus swap, the figure Android vitals reports as memory usage): anonRssAndSwapMemoryUsageP50/P90/P99 in bytes plus distinctUsers. Also supports P75 and P95 via metrics, and the processName and appState dimensions. Use query_bitmap_memory_usage to see how much of it is bitmaps. 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_memory_usage"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMax rows to return (default: 50)
filterNoAIP-160 filter over dimensions, e.g. "versionCode = 415"
metricsNoMetrics to fetch (default: anonRssAndSwapMemoryUsageP50, anonRssAndSwapMemoryUsageP90, anonRssAndSwapMemoryUsageP99, 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.9/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, so safety is covered. The description adds the practical constraint 'Daily aggregation only.' and lists the metric set, but it says nothing about freshness/latency of the data or pagination behavior of the returned rows, even though get_vitals_freshness exists as a sibling.

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?

Front-loaded with the core purpose and the returned metric names, then the constraint, then the alternative. The first sentence is dense with parenthetical detail but every clause carries information an agent needs; 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?

No output schema exists, so the description carries the return contract, and it does name the returned metrics and units. With eight parameters fully documented by the schema and safety covered by annotations, the remaining omission is data freshness/pagination, which is minor for a read-only query tool.

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 the schema already documents metrics, dimensions, filter syntax, dates, limit and aggregation_period. The description adds only marginal meaning beyond that: that P75 and P95 are reachable through metrics and that processName and appState are valid dimensions, both of which are already visible in the schema enum.

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?

Names a specific verb and resource ('overall app memory usage percentiles') and pins down the exact figures returned (anonRssAndSwapMemoryUsageP50/P90/P99 in bytes plus distinctUsers). It also states that this is the Android vitals memory-usage figure, which distinguishes it from the many other vitals metrics tools without needing their schemas.

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?

Explicitly routes bitmap breakdown work to query_bitmap_memory_usage, which is real when-to-use guidance against a named alternative. It stops short of stating exclusions such as when the daily-only restriction makes another aggregation source preferable, so it is strong but not complete.

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