Skip to main content
Glama

Render stats

render_stats

Measure an app's real view tree, render-node memory, jank rate and frame-time percentiles to prove a long unvirtualised list is dropping frames. Reset counters to isolate one interaction.

Instructions

Count an app's REAL view tree and recent frame health: total views, render-node kB, per-window breakdown, jank percentage and frame-time percentiles, plus Choreographer's "Skipped N frames" tally. Use this — not describe_ui — to MEASURE a screen: describe_ui is viewport-scoped (Android drops off-screen ScrollView children from the accessibility tree), so it undercounts a long list even at filter="all". The three numbers together are what argues an unvirtualised list: a large view count, render-node kB that grows as you scroll, and skipped frames on the main thread. Pass reset=true to zero the frame counters after reading so the next call measures one specific interaction.

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": {
      "package": "<package>"
    },
    "name": "render_stats"
  }
}

Input Schema

NameRequiredDescriptionDefault
resetNoZero gfxinfo's frame counters after reading, so the NEXT call measures only what happens in between. Use it to attribute jank to one interaction instead of to the whole session.
serialNoTarget device serial (adb -s). Optional when exactly one device is attached.
packageYesApplication package name.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.23.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations only supply destructiveHint=false and openWorldHint=false, so the description carries most of the burden and does so: it explains that results reflect the real view tree rather than the accessibility tree, and that reset zeroes gfxinfo frame counters after reading (a state change worth flagging). It does not mention whether device permissions or a debuggable build are required, which is a minor remaining gap.

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?

Well front-loaded: purpose first, then the sibling comparison, then the interpretation triad, then reset usage. It is on the long side and the closing reset sentence partly duplicates the schema, but every sentence contributes a distinct decision cue.

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

Completeness5/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 enumerating the returned metrics and explaining that the three signals together argue an unvirtualised list. Nothing an agent needs in order to call it correctly or interpret the result appears to be missing.

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 baseline is 3. The description reinforces reset's semantics ("zero the frame counters after reading so the next call measures one specific interaction"), but that largely restates the schema's own wording and adds no new syntax or constraint for package or serial.

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 ("Count an app's REAL view tree and recent frame health") and enumerates exactly what is measured: total views, render-node kB, per-window breakdown, jank percentage, frame-time percentiles, and Choreographer's skipped-frame tally. It distinguishes itself from the closest sibling by name, so an agent can separate render_stats from describe_ui without opening either schema.

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

Usage Guidelines5/5

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

Explicitly says "Use this — not describe_ui — to MEASURE a screen" and gives the reason (describe_ui is viewport-scoped and drops off-screen ScrollView children). It also gives conditional guidance for reset=true, telling the agent when to use it to attribute jank to one interaction rather than a whole session.

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