Skip to main content
Glama
rahulkr
by rahulkr

get_frame_stats

Analyze frame rendering performance to identify jank in Android applications. Use this tool to detect UI stutters and optimize app smoothness during development and testing.

Instructions

Get frame rendering stats for an app - useful for detecting jank

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
package_nameYes
device_serialNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The get_frame_stats tool handler function, registered via @mcp.tool() decorator. It retrieves frame rendering statistics for the specified Android package by executing the ADB command 'dumpsys gfxinfo <package_name> framestats'. This helps detect jank and performance issues in app rendering.
    @mcp.tool()
    def get_frame_stats(package_name: str, device_serial: str | None = None) -> str:
        """Get frame rendering stats for an app - useful for detecting jank"""
        return run_adb(["shell", "dumpsys", "gfxinfo", package_name, "framestats"], device_serial)
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It states the tool retrieves stats but doesn't disclose behavioral traits such as whether it requires app to be running, permissions needed, rate limits, or what the output format entails. The mention of 'detecting jank' adds some context but is insufficient for a mutation-free read operation.

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?

The description is a single, efficient sentence that front-loads the purpose and adds a brief utility note. There is no wasted text, and it's appropriately sized for the tool's complexity.

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

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations, 2 parameters with 0% schema coverage, and an output schema present, the description is minimally adequate. It states the tool's purpose but lacks details on parameters, behavioral context, and usage guidelines. The output schema may cover return values, but the description doesn't provide enough context for effective use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate but adds no parameter information. It doesn't explain what 'package_name' or 'device_serial' mean, their formats, or how they affect the stats retrieval. With 2 parameters and no schema descriptions, this is a significant gap.

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?

The description clearly states the verb 'Get' and the resource 'frame rendering stats for an app', specifying it's for detecting jank. It distinguishes from siblings by focusing on performance metrics rather than UI elements, logs, or device actions, though it doesn't explicitly contrast with tools like get_flutter_performance_overlay.

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus alternatives like get_flutter_performance_overlay or get_cpu_info for performance analysis. The description mentions it's 'useful for detecting jank', which implies a context but doesn't specify prerequisites, timing, or exclusions.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/rahulkr/r_adb_mcp_server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server