Skip to main content
Glama

input_text

Type text into focused input fields on Android devices through the Android MCP Server, enabling automated text entry for UI automation tasks.

Instructions

Type text into the currently focused input field on the Android device. The field must already be focused (tapped).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYesText to type into the focused field
device_idNoDevice serial number

Implementation Reference

  • Implementation of the input_text tool handler which uses adb shell to send text input.
    export async function inputText(text: string, deviceId?: string): Promise<string> {
      const resolved = await deviceManager.resolveDeviceId(deviceId);
      deviceManager.checkRateLimit(resolved);
    
      const sanitized = sanitizeTextInput(text);
      await adbShell(['input', 'text', sanitized], resolved);
    
      deviceManager.touchSession(resolved);
      log.info('Text input performed', { textLength: text.length, deviceId: resolved });
      return text;
    }

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/divineDev-dotcom/android_mcp'

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