Skip to main content
Glama

input_text

Send text input to Android devices for automated testing, debugging, and development workflows. Type text into focused fields to simulate user interactions during app testing.

Instructions

Type text into the currently focused field

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYes
device_serialNo

Implementation Reference

  • Handler function for the 'input_text' tool. It escapes the input text for shell safety and executes an ADB shell input text command to type into the currently focused field on the Android device.
    @mcp.tool() def input_text(text: str, device_serial: str | None = None) -> str: """Type text into the currently focused field""" # Escape special characters for shell escaped = text.replace(" ", "%s").replace("&", "\\&").replace("<", "\\<").replace(">", "\\>") return run_adb(["shell", "input", "text", escaped], device_serial)

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/rahulkr/r_adb_mcp_server'

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