Skip to main content
Glama
rahulkr
by rahulkr

check_flutter_app_running

Check if a Flutter app is currently running in the foreground on an Android device. Use this tool to verify app state during development, testing, or debugging workflows.

Instructions

Check if a Flutter app is currently in foreground

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
device_serialNo

Implementation Reference

  • The handler function implementing the 'check_flutter_app_running' tool. It checks the current foreground activity for Flutter indicators and scans recent logcat output for Flutter logs. The @mcp.tool() decorator registers it as an MCP tool.
    @mcp.tool()
    def check_flutter_app_running(device_serial: str | None = None) -> dict:
        """Check if a Flutter app is currently in foreground"""
        activity = get_current_activity(device_serial)
        
        # Check if it's a Flutter activity
        is_flutter = False
        if activity.get('activity'):
            is_flutter = 'flutter' in activity['activity'].lower()
        
        # Also check for Flutter in logcat
        logs = run_adb(["shell", "logcat", "-d", "-t", "20", "-s", "flutter"], device_serial)
        has_recent_flutter_logs = len(logs.strip()) > 0
        
        return {
            "current_activity": activity,
            "likely_flutter_app": is_flutter or has_recent_flutter_logs,
            "recent_flutter_logs": has_recent_flutter_logs
        }
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states what the tool does but doesn't describe how it works, what permissions are required, whether it's read-only or has side effects, what happens if the app isn't running, or what the return format looks like. For a tool with zero annotation coverage, this is insufficient.

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 gets straight to the point with zero wasted words. It's appropriately sized for a simple checking tool and front-loads the core purpose immediately.

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

Completeness2/5

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

Given no annotations, 0% schema coverage, and no output schema, the description is incomplete. It states the basic purpose but doesn't address parameter usage, return values, behavioral characteristics, or integration with sibling tools. For a tool that likely returns boolean or status information, more context is needed.

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. It mentions no parameters at all, leaving the 'device_serial' parameter completely undocumented. The description doesn't explain when this parameter is needed, what values it accepts, or what happens when it's omitted (defaults to null).

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 tool's purpose with a specific verb ('Check') and resource ('Flutter app'), specifying the condition being checked ('currently in foreground'). It doesn't explicitly distinguish from sibling tools, but the purpose is unambiguous within the context of Flutter app testing.

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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites, related tools for similar checks, or scenarios where this check is appropriate versus other status-checking tools in the sibling list.

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