Skip to main content
Glama

list_apps

Retrieve a list of all installed applications on a connected Android device using the 'list_apps' tool within the espresso-mcp server. Ideal for monitoring and managing app inventory.

Instructions

List all installed apps on the connected Android device

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler function for the 'list_apps' tool. Uses 'adb shell pm list packages' to retrieve the list of installed packages on the connected Android device and returns them as a list of package names.
    @mcp.tool() def list_apps() -> list: """List all installed apps on the connected Android device""" result = subprocess.run( ["adb", "shell", "pm", "list", "packages"], capture_output=True, text=True ) if result.returncode != 0: raise RuntimeError(f"Error listing installed apps: {result.stderr}") apps = [line.replace("package:", "").strip() for line in result.stdout.splitlines()] return apps
  • The @mcp.tool() decorator registers the list_apps function as an MCP tool.
    @mcp.tool()

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/vs4vijay/espresso-mcp'

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