Skip to main content
Glama

mobile_type

Input text into Android text fields and optionally submit using Enter key. Enables automated text entry for mobile device interaction and testing.

Instructions

Input text into the currently focused text field on Android.

Args: text: The text to input submit: Whether to submit text (press Enter key) after typing

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
submitNo
textYes

Implementation Reference

  • main.py:145-162 (handler)
    The complete implementation of the 'mobile_type' tool, including its @mcp.tool() decorator for registration and the full handler function logic using uiautomator2's device.send_keys() to input text into the focused field, with optional submit via Enter key.
    @mcp.tool() def mobile_type(text: str, submit: bool = False) -> str: """Input text into the currently focused text field on Android. Args: text: The text to input submit: Whether to submit text (press Enter key) after typing """ if device is None: return "Error: Device not initialized. Please call mobile_init() first to establish connection with Android device." try: device.send_keys(text) if submit: device.press("enter") return f"Successfully input text: {text} and pressed Enter" return f"Successfully input text: {text}" except Exception as e: return f"Error inputting text: {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