Skip to main content
Glama

mobile_list_apps

List installed applications on Android devices to retrieve package names and app labels for device management and automation tasks.

Instructions

List all installed applications on the Android device.

Returns a JSON array with package names and application labels.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • main.py:236-250 (handler)
    The handler function decorated with @mcp.tool() that lists all launchable installed apps on the Android device. It retrieves the app list using uiautomator2's device.app_list(), filters using is_launchable_app, and returns a formatted JSON string.
    @mcp.tool()
    def mobile_list_apps() -> str:
        """List all installed applications on the Android device.
        
        Returns a JSON array with package names and application labels.
        """
        if device is None:
            return "Error: Device not initialized. Please call mobile_init() first to establish connection with Android device."
        try:
            apps = device.app_list()
            launchable_apps = [pkg for pkg in apps if is_launchable_app(pkg)]
            return json.dumps(launchable_apps, ensure_ascii=False, indent=2)
        except Exception as e:
            return f"Error listing apps: {str(e)}"
  • Helper function used by mobile_list_apps to filter only launchable apps by excluding system apps and checking if cmd package resolve-activity returns a valid activity.
    def is_launchable_app(package):
        if is_system_app(package):
            return False
        
        try:
            response = device.shell(f"cmd package resolve-activity --brief {package}")
            output = response.output
            return "/" in output
        except Exception:
            return False
  • Helper function to identify and exclude system apps based on package name regex patterns, used indirectly by mobile_list_apps.
    def is_system_app(package):
        exclude_patterns = [
            r"^com\.android\.systemui",
            r"^com\.android\.providers\.",
            r"^com\.android\.internal\.",
            r"^com\.android\.cellbroadcast",
            r"^com\.android\.phone",
            r"^com\.android\.bluetooth",
            r"^com\.google\.android\.overlay",
            r"^com\.google\.mainline",
            r"^com\.google\.android\.ext",
            r"\.auto_generated_rro_",
            r"^android$",
        ]
        return any(re.search(p, package) for p in exclude_patterns)
  • main.py:236-236 (registration)
    The @mcp.tool() decorator registers the mobile_list_apps function as an MCP tool.
    @mcp.tool()
Behavior2/5

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

With no annotations provided, the description carries full burden but only states it returns a JSON array. It doesn't disclose behavioral traits like whether this requires device permissions, if it's read-only/safe (implied but not explicit), rate limits, or error conditions. The description adds minimal value beyond the basic 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?

Two sentences with zero waste: first states purpose, second specifies return format. It's front-loaded with the core action and efficiently structured, with every sentence earning its place by adding distinct 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 tool's low complexity (0 params, output schema exists), the description is reasonably complete. It covers what the tool does and return format, though lacks behavioral context like permissions or errors. With an output schema handling return values, the description doesn't need to detail JSON structure further.

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?

The tool has 0 parameters with 100% schema description coverage, so the schema already fully documents inputs. The description appropriately doesn't add parameter details, maintaining focus on the tool's purpose. Baseline 4 is correct for zero-parameter tools.

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 clearly states the specific action ('List all installed applications') and resource ('on the Android device'), distinguishing it from siblings like mobile_launch_app (which launches apps) and mobile_dump_ui (which dumps UI). It precisely defines scope without ambiguity.

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

Usage Guidelines3/5

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

The description implies usage context (Android device management) but provides no explicit guidance on when to use this tool versus alternatives. It doesn't mention prerequisites like needing mobile_init first or compare with other list/query tools, leaving usage decisions to inference.

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/erichung9060/Android-Mobile-MCP'

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