Skip to main content
Glama

Type text

android_input_text

Types ASCII text into the focused input field on an Android device; optionally presses Enter. Rejects non-ASCII input and the literal '%s' to prevent corruption.

Instructions

Type text into the focused input field.

Two limitations come from Android's 'input text' command itself, not from this tool. Both are rejected up front with an explanation rather than silently mangling the text:

  • ASCII only. Korean, Japanese, Chinese, emoji and accented letters cannot be injected at all. Use an IME that accepts adb broadcasts (ADBKeyBoard is the usual one), or set the value directly in the app under test.

  • The literal sequence '%s' cannot be typed. Spaces are transmitted as '%s', and Android's decoder has no escape for a real one — even '%%s' decodes to '% '.

Tap the field first (android_tap) so it has focus.

Args:

  • text (string): ASCII text to type

  • serial (string, optional): target device

  • submit (boolean): press Enter afterwards (default: false)

Returns: { "typed": string, "submitted": boolean, "serial": string }

Examples:

  • Use when: filling a login form -> text="user@example.com"

  • Use when: entering a search term and running it -> text="pizza", submit=true

  • Don't use when: the text contains non-ASCII characters (see the limitation above)

Error Handling:

  • Rejects non-ASCII input, and text containing a literal '%s', with an explanation instead of mangling it

  • Text going nowhere means no field has focus; tap the field first

  • Text appended to existing content means the field was not empty; clear it first

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYesASCII text to type.
serialNoDevice serial from android_list_devices. Optional when exactly one device is connected; required when several are.
submitNoPress Enter after typing.
Behavior5/5

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

Beyond the annotations, the description thoroughly discloses behavioral limitations inherited from Android's 'input text' command, including ASCII-only rejection, '%s' escaping, focus requirement, and text append behavior. It also explains error handling up front, adding substantial context beyond the readOnly/destructive hints.

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?

Although lengthy, every section earns its place: limitations, prerequisites, args, returns, examples, and error handling. The structure uses clear headers and bullet points, front-loading the core purpose and limitations before details. No redundancy or filler.

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

Completeness5/5

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

Covers all essential aspects for correct invocation: returns object, error cases, focus prerequisite, clearing behavior, and ASCII limitations. With no output schema, the description provides a full picture of what to expect. The examples tie usage to practical scenarios and sibling-tool context (android_tap).

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

Parameters5/5

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

Schema coverage is 100%, but the description enriches parameter meaning with crucial constraints: text is ASCII-only, submit implies pressing Enter, and serial is tied to android_list_devices. It also explains edge cases like '%s' and clearing the field first, which the schema does not capture.

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 opens with 'Type text into the focused input field,' a specific verb+resource statement that clearly distinguishes this tool from siblings like android_tap and android_key_event. It also explicitly differentiates its scope by explaining what it does not do (non-ASCII, '%s').

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

Usage Guidelines5/5

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

Provides explicit when-to-use ('filling a login form', 'entering a search term and running it'), when-not-to-use ('Don't use when: the text contains non-ASCII characters'), and prerequisites ('Tap the field first (android_tap) so it has focus'). It even suggests alternatives for non-ASCII cases, exceeding typical guidance.

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/jjs03111/android-build-mcp'

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