Skip to main content
Glama

Robot Actions — Remote Device Control

device_type

Type text into the focused field on Android. CRITICAL: call this AFTER device_tap / device_tap_by_text completes — do NOT issue the focusing tap and this type in parallel, or the type will race the focus change and land in the previously-focused field (observed on a banking-app login: username+password concatenated into username box). method="keys" (default): decompose ASCII to keycode events (DOWN/UP with shift) — most reliable; non-ASCII chars (CJK/emoji) auto-fall-back to IME injection for that segment. method="ime": IME injection only — full UTF-8 in one shot, but Samsung IMEs intercept ./@/_ as autocomplete/action shortcuts and may trigger system gestures. method="shell": shell input text — slowest, and Samsung IME drops @/./_. Optional clearFirst wipes the field first; pressKey sends a keycode after typing. All three methods inject — there is no kernel input path for text, and no tool that types a whole string as one. To get text in as real kernel input you compose the reports yourself with device_uhid_create plus device_uhid_input (or device_uhid_key_press per character); only worth it when the app filters injected text.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYesText to type
udidYesDevice serial number (UDID)
methodNoInjection method: keys | ime | shell (default: keys — most reliable for ASCII; non-ASCII auto-falls-back to IME).
pressKeyNoKeycode to press AFTER typing (e.g. ENTER, TAB, SEARCH) — handles common "type then submit" flows in one call
clearFirstNoClear the field before typing — reads its current length from the UI and sends exactly that many backspaces (default: false)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedInput schema / properties / clearFirst / description
      Previous value: -"Clear the field before typing — reads its current length from the UI and sends exactly that many backspaces (default: false)"New value: +"Clear the field before typing — reads its current length from the UI and sends exactly that many backspaces (default: false)"
    • changedInput schema / properties / method / description
      Previous value: -"Injection method: keys | ime | shell (default: keys — most reliable for ASCII; non-ASCII auto-falls-back to IME)."New value: +"Injection method: keys | ime | shell (default: keys — most reliable for ASCII; non-ASCII auto-falls-back to IME)."
    • changedInput schema / properties / pressKey / description
      Previous value: -"Keycode to press AFTER typing (e.g. ENTER, TAB, SEARCH) — handles common \"type then submit\" flows in one call"New value: +"Keycode to press AFTER typing (e.g. ENTER, TAB, SEARCH) — handles common \"type then submit\" flows in one call"
  2. Changed3 schema fields changed
    • changedInput schema / properties / clearFirst / description
      Previous value: -"Clear the field before typing — reads its current length from the UI and sends exactly that many backspaces (default: false)"New value: +"Clear the field before typing — reads its current length from the UI and sends exactly that many backspaces (default: false)"
    • changedInput schema / properties / method / description
      Previous value: -"Injection method: keys | ime | shell (default: keys — most reliable for ASCII; non-ASCII auto-falls-back to IME)."New value: +"Injection method: keys | ime | shell (default: keys — most reliable for ASCII; non-ASCII auto-falls-back to IME)."
    • changedInput schema / properties / pressKey / description
      Previous value: -"Keycode to press AFTER typing (e.g. ENTER, TAB, SEARCH) — handles common \"type then submit\" flows in one call"New value: +"Keycode to press AFTER typing (e.g. ENTER, TAB, SEARCH) — handles common \"type then submit\" flows in one call"
  3. First observed

TDQS

A5/5.0
Behavior5/5

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

With no annotations provided, the description carries the full burden and exceeds it. It discloses the race-condition failure mode with a real observed example, explains that all three methods are injection paths with no kernel input route, and warns about Samsung IME intercepting specific characters — behavior an agent could not infer from the schema alone.

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 long but every sentence earns its place. The critical race-condition warning is front-loaded, method distinctions are compactly organized, and the alternative kernel-input path is mentioned without unnecessary elaboration.

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?

For a complex Android input tool with no annotations and no output schema, this description covers prerequisites, sequencing, method trade-offs, failure modes, optional parameters, and alternatives. Nothing needed to select and call it correctly is missing.

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?

Although the schema already documents all parameters (100% coverage), the description adds substantial meaning: it explains the mechanics of method=keys (ASCII decomposition with shift), the non-ASCII fallback behavior, what clearFirst actually does (reads length and sends backspaces), and how pressKey combines type-then-submit flows. This goes well beyond the schema's one-line descriptions.

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?

States a specific verb and resource: 'Type text into the focused field on Android.' It clearly distinguishes itself from related input tools by explaining that all methods inject text and that no tool types a whole string as real kernel input, directing agents to device_uhid_* for that use case.

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 sequencing guidance: call AFTER device_tap / device_tap_by_text completes and do NOT run the tap and type in parallel. It also gives concrete selection criteria for method=keys vs ime vs shell, including Samsung IME quirks, and points to device_uhid_create/input as the alternative when an app filters injected text.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources