Skip to main content
Glama

Robot Actions — Remote Device Control

Device type

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

A4.8/5.0
Behavior5/5

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

Discloses non-obvious behavior far beyond the annotations: the focus-race hazard, method tradeoffs (keys vs ime vs shell), Samsung IME quirks with `.`/`@`/`_`, non-ASCII auto-fallback, and clearFirst's backspace-count mechanics. Annotations only cover the safety profile (readOnlyHint=false, destructiveHint=false), so the description carries the real burden and does so well.

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

Conciseness4/5

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

Front-loads the CRITICAL sequencing warning, then systematically covers methods. It is dense and long, but nearly every clause carries actionable detail; the only minor cost is that the method taxonomy is packed into one block rather than being skimmable.

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 5-parameter mutation tool with no output schema, the description covers everything an agent needs: preconditions, method selection, side effects (injected text is detectable, no kernel path), and escalation path to uhid tools. Nothing material is missing.

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 coverage is 100%, so the baseline is 3, but the description adds genuine meaning: it explains method semantics and defaults, the non-ASCII fallback behavior, and pressKey's 'type then submit' purpose. It complements rather than repeats the schema.

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+resource+platform ('Type text into the focused field on Android'), immediately distinguishing it from the iOS/Web typing siblings (ios_send_keys, webpage_type, web_type). An agent can tell exactly what this does without opening the schema.

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?

Explicitly states the precondition ('call this AFTER device_tap / device_tap_by_text completes') and the anti-pattern ('do NOT issue the focusing tap and this type in parallel'), with a concrete failure observed in production. It also routes to alternatives (device_uhid_create / device_uhid_input) for the filtering-app case.

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