Skip to main content
Glama

Type text

type_text
Destructive

Types literal text as keystrokes into the focused field or a specified element, inserting at the caret without clearing existing content; ideal for short entries or fields that reject set_value.

Instructions

Type literal text as keystrokes into the field that currently has focus, optionally focusing element_id first. Use it for short entries and for fields that reject set_value; use set_value to replace a long value in one step, and press_key for shortcuts or keys such as return and tab. Text is inserted at the caret without clearing what is already there. Typing into password fields is refused by default (see COMPUTER_USE_ALLOW_SECURE_FIELD_INPUT).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYesExact text to type, character by character
element_idNoElement to focus before typing, from get_app_state. Omit to type into whatever currently has focus.
state_queryNoWith return_state, list only elements whose role, label or value contains this text, like get_app_state's query
return_stateNoAfter acting, wait briefly for the UI to settle and append a fresh get_app_state of the app you last read, so you can check the result and pick the next target in the same call. Its ids replace every earlier id.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.5.2
    • addedInput schema / properties / return_state
      Added value: +{
      +  "description": "After acting, wait briefly for the UI to settle and append a fresh get_app_state of the app you last read, so you can check the result and pick the next target in the same call. Its ids replace every earlier id.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / state_query
      Added value: +{
      +  "description": "With return_state, list only elements whose role, label or value contains this text, like get_app_state's query",
      +  "type": "string"
      +}
  2. Changed2 schema fields changedv0.3.1
    • changedInput schema / properties / element_id / description
      Previous value: -"Focus this element before typing"New value: +"Element to focus before typing, from get_app_state. Omit to type into whatever currently has focus."
    • addedInput schema / properties / text / description
      Added value: +"Exact text to type, character by character"
  3. First observedv0.3.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and idempotentHint=false, but the description adds real context beyond them: text is inserted at the caret without clearing existing content, and password fields are refused by default with a named env override. This is meaningful behavioral disclosure, though response/error behavior is not covered.

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?

Front-loaded with the core action, then when-to-use, then behavioral caveats. Every sentence earns its place with no redundancy.

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?

Covers purpose, routing, and key behavioral caveats for a 4-param mutation tool with no output schema. Sufficient to invoke correctly, though error/return behavior is left implicit.

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 all four parameters including element_id focus and return_state. The description reinforces element_id focusing but adds little syntax beyond what the schema provides.

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 literal text as keystrokes into the field that currently has focus') and explicitly distinguishes itself from set_value and press_key.

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?

Gives explicit when-to-use ('short entries', 'fields that reject set_value') plus named alternatives for the other two cases (set_value for long replacements, press_key for shortcuts/return/tab). Routing is fully specified.

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