Skip to main content
Glama

mobile_init

Establish connection to Android devices for UI automation, enabling screen interaction, app control, and testing capabilities through ADB.

Instructions

Initialize the Android device connection.

Must be called before using any other mobile tools.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • main.py:85-97 (handler)
    The handler function for the 'mobile_init' tool, decorated with @mcp.tool() which also serves as its registration in the FastMCP server. It initializes the connection to the Android device using uiautomator2.
    @mcp.tool() def mobile_init() -> str: """Initialize the Android device connection. Must be called before using any other mobile tools. """ global device try: device = u2.connect() return "Device initialized successfully" except Exception as e: device = None return f"Error initializing device: {str(e)}"
  • main.py:85-85 (registration)
    The @mcp.tool() decorator registers the mobile_init 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/erichung9060/Android-Mobile-MCP'

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