Skip to main content
Glama

mobile_type

Input text into Android text fields for automated testing and interaction, supporting submission with Enter key press.

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
textYes
submitNo

Implementation Reference

  • main.py:145-162 (handler)
    The main handler function for the 'mobile_type' tool. It is registered via the @mcp.tool() decorator and implements the logic to input text into the focused field on the Android device using uiautomator2's send_keys method, with an optional submit action.
    @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