Skip to main content
Glama

get_anr_rate

Retrieve ANR (Application Not Responding) rates from Android Vitals to monitor app stability, identify versions exceeding bad behavior thresholds, and prevent Play Store ranking penalties.

Instructions

Fetch ANR (Application Not Responding) rate from Android Vitals.

Returns daily anrRate, userPerceivedAnrRate, and distinctUsers by version code. Bad behavior threshold: userPerceivedAnrRate > 0.47% may cause Play Store ranking penalties.

Args: package_name: Package name, e.g. com.example.myapp days: Past days to include (default 7, max 30). version_code: Optional version code filter.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
package_nameYes
daysNo
version_codeNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The get_anr_rate function acts as the MCP tool handler, parsing arguments and invoking the internal _reporting().query_anr_rate method to retrieve ANR rate data.
    def get_anr_rate(
        package_name: str,
        days: int = 7,
        version_code: str = "",
    ) -> str:
        """Fetch ANR (Application Not Responding) rate from Android Vitals.
    
        Returns daily anrRate, userPerceivedAnrRate, and distinctUsers by version
        code. Bad behavior threshold: userPerceivedAnrRate > 0.47% may cause
        Play Store ranking penalties.
    
        Args:
            package_name: Package name, e.g. com.example.myapp
            days: Past days to include (default 7, max 30).
            version_code: Optional version code filter.
        """
        days = max(1, min(days, 30))
        try:
            raw = _reporting().query_anr_rate(
                package_name=package_name,
                days=days,
                version_code=version_code or None,
            )
            rows = _parse_reporting_rows(raw.get("rows", []))
            if not rows:
                return json.dumps(
                    {
                        "packageName": package_name,
                        "message": (
Behavior4/5

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

No annotations provided, so description carries full burden. It successfully discloses return values (anrRate, userPerceivedAnrRate, distinctUsers) and critical business logic (the 0.47% threshold causing ranking penalties), adding essential domain context beyond basic data retrieval.

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-structured with clear separation between purpose, return values, behavioral thresholds, and parameter documentation. The Args section is slightly informal but efficiently conveys necessary constraints. Every sentence adds value.

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?

Given the output schema exists and parameters are documented, the description is complete. It appropriately includes the Play Store penalty threshold—critical domain knowledge for an Android vitals tool—without needing to duplicate the full output schema.

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 has 0% description coverage (only titles). The description compensates effectively by documenting all 3 parameters in the Args section: package_name with example, days with default/max constraints, and version_code as optional filter.

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?

The description states a specific verb ('Fetch') and resource ('ANR rate from Android Vitals'), clearly distinguishing this from sibling tools like get_crash_rate or get_vitals_summary by explicitly mentioning ANR-specific metrics.

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?

Provides valuable usage context through the 'Bad behavior threshold' warning (0.47% and Play Store penalties), indicating when this data is critical. However, it does not explicitly state when to choose this over get_vitals_summary or get_crash_rate.

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/AgiMaulana/GooglePlayConsoleMcp'

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