Skip to main content
Glama

mobile_init

Initialize Android device connection to enable UI manipulation, screen capture, touch gestures, and app management. Required before using other mobile automation tools.

Instructions

Initialize the Android device connection.

Must be called before using any other mobile tools.

Input Schema

NameRequiredDescriptionDefault

No arguments

Input Schema (JSON Schema)

{ "properties": {}, "type": "object" }

Implementation Reference

  • main.py:85-98 (handler)
    The handler function for the 'mobile_init' tool. It uses the @mcp.tool() decorator for registration and implements the logic to connect to the Android device using uiautomator2.connect(), setting the global 'device' variable.
    @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)}"

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