Skip to main content
Glama

ui_type

ui_type

Types text into a matching editable element one key at a time, appending to existing content, for autocomplete, search-as-you-type, masked inputs, and OTP boxes.

Instructions

Type text into the single editable element matching the selector one key at a time, like a user (keydown, input and keyup per character), appending to what is already there. Use it instead of ui_fill for autocomplete, search-as-you-type, masked inputs (phone, card) and OTP boxes. Use the selector from ui_get_page_state. Text typed into a password, one-time-code or card-number field is never stored in the report. Selectors containing "nth=" are positional: call ui_get_page_state again after the page changes before reusing them.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "selector": "<selector>",
      "text": "<text>"
    },
    "name": "ui_type"
  }
}

Input Schema

NameRequiredDescriptionDefault
textYesThe text to type
delayMsNoPause between keystrokes in ms (0-500, default 0), for fields that debounce input
selectorYesCSS selector, or the `selector` value of an element from ui_get_page_state, passed unchanged
session_idNoWhich open session to act on, as returned by ui_start_session. Optional with one open session; required when several are open.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/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 does so: it discloses that input is appended rather than replacing existing text, that keystrokes are simulated individually, that sensitive field content is excluded from the report, and that "nth=" selectors are positional and expire after page changes. These are exactly the behaviors an agent cannot infer from the schema.

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?

Opens with the verb, resource and mechanism, then alternatives, then safety metadata, then a selector-reuse caveat – a sensible front-to-back ordering with no filler. Every sentence contributes a distinct fact; nothing is repeated from the schema.

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

Completeness4/5

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

For a 4-parameter action tool with no annotations and no output schema, the description covers mechanism, API choice, sensitive-data handling and selector lifetime, which is substantial. The remaining gap is failure behavior – what happens if no element matches or multiple elements match, and whether the target must be focused or visible first.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents selector, text, delayMs and session_id. The description's only parameter-adjacent point (use the selector from ui_get_page_state) restates the schema's own wording, and delayMs/debounce is likewise already in the schema, so little meaning is added beyond the baseline.

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 single editable element matching the selector") plus the mechanism ("one key at a time... keydown, input and keyup per character") that separates it from ui_fill. An agent can tell from the first sentence alone that this is a keystroke-level typing tool, not a bulk setter.

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?

Names the alternative tool explicitly and gives the selection conditions: "Use it instead of ui_fill for autocomplete, search-as-you-type, masked inputs (phone, card) and OTP boxes." It also tells the agent where to get the selector from (ui_get_page_state) and warns when a selector goes stale, which is concrete when-to-use and when-to-recapture guidance.

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