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

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

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)}"
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden. It discloses the basic behavior (text input with optional submission) but lacks details like error conditions (e.g., if no field is focused), performance characteristics, or platform-specific constraints. It adequately covers the core operation but misses advanced context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with the core purpose, followed by a structured Args section. Every sentence earns its place—no fluff or repetition. It's efficiently sized for the tool's complexity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (2 parameters, no annotations, but with an output schema), the description is mostly complete. It covers purpose and parameters well, but lacks behavioral nuances like error handling. The output schema likely handles return values, so that gap is acceptable.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It clearly explains both parameters: 'text' as the content to input and 'submit' as triggering an Enter key press. This adds essential meaning beyond the bare schema, though it doesn't detail format constraints or examples.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Input text') and target resource ('currently focused text field on Android'), distinguishing it from sibling tools like mobile_click or mobile_key_press. It precisely defines the tool's scope without ambiguity.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage when text input is needed on Android, but provides no explicit guidance on when to use this versus alternatives like mobile_key_press for individual keystrokes or mobile_click to focus fields first. No exclusions or prerequisites are mentioned.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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