Skip to main content
Glama

type_text

Idempotent

Set text in input, textarea, or contenteditable fields by selector/ref, replacing values and firing input/change events so controlled inputs update. Use key-by-key mode for autocomplete or masked fields.

Instructions

Put text into an input, textarea or contenteditable, by selector or ref. Replaces the whole value through the native setter (React/Vue controlled inputs register it) and fires input and change. mode=keys emits keydown/input/keyup per character for autocomplete and masked fields: slower, use it only when mode=set leaves the field empty. Returns value_after; mismatch=true means the field did not keep the value: retry with mode=keys.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
refNoFrom get_interactives, e.g. "n3"
modeNoset = assign value; keys = per-char events (autocomplete/masked); trusted = real input via chrome.debugger, main frameset
textYesValue to type; empty string clears the field
tab_idNoTarget tab; omitted = last tab navigated in this session, else the active one
frame_idNoTarget iframe id from get_frames; omitted = main frame
selectorNoCSS selector; ">>>" pierces shadow DOM. Ignored when ref is given
wait_afterNoSettle before returning: navigation waits for a page load, networkidle for quiet trafficnone

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.28.0
    • changedInput schema / properties / mode / description
      Previous value: -"set = assign value; keys = per-char events (autocomplete/masked)"New value: +"set = assign value; keys = per-char events (autocomplete/masked); trusted = real input via chrome.debugger, main frame"
    • changedInput schema / properties / mode / enum
      Previous value: -[
      -  "set",
      -  "keys"
      -]New value: +[
      +  "set",
      +  "keys",
      +  "trusted"
      +]
  2. Changed5 schema fields changedv1.10.0
    • addedInput schema / properties / frame_id / description
      Added value: +"Target iframe id from get_frames; omitted = main frame"
    • addedInput schema / properties / selector / description
      Added value: +"CSS selector; \">>>\" pierces shadow DOM. Ignored when ref is given"
    • addedInput schema / properties / tab_id / description
      Added value: +"Target tab; omitted = last tab navigated in this session, else the active one"
    • addedInput schema / properties / text / description
      Added value: +"Value to type; empty string clears the field"
    • addedInput schema / properties / wait_after / description
      Added value: +"Settle before returning: navigation waits for a page load, networkidle for quiet traffic"
  3. First observedv1.8.0

TDQS

A4.3/5.0
Behavior5/5

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

Annotations only establish the safety profile (readOnly=false, idempotent=true, destructive=false). The description adds substantive behavior beyond them: value is replaced through the native setter so React/Vue controlled inputs register it, input and change events fire, mode=keys emits keydown/input/keyup per character, and mismatch=true signals the field rejected the value.

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?

Four dense sentences with no filler, front-loaded with the core action and target, then mode semantics, then return/retry behavior. The density is appropriate given the description must carry return-value meaning in the absence of an output schema.

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?

With no output schema, the description correctly compensates by explaining the return signals (value_after, mismatch) and the recovery action. Combined with the mode tradeoffs and target scoping (selector vs ref), an agent has everything needed to call and interpret this tool.

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 meaning the schema does not: the performance/reliability tradeoff between mode=set and mode=keys, the retry implication of mismatch, and what value_after reports. This goes beyond the schema's terse parameter blurbs.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource ('Put text into an input, textarea or contenteditable, by selector or ref'), which is clear and actionable. It does not explicitly name or distinguish itself from overlapping siblings like fill_form or press_key, so it stops short of full sibling differentiation.

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

Usage Guidelines4/5

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

It gives explicit selection guidance for the mode parameter: 'keys ... slower, use it only when mode=set leaves the field empty,' and prescribes a retry with mode=keys on mismatch. It offers no when-to-use guidance relative to alternative tools (fill_form, press_key), so guidance is strong within-parameters but absent across siblings.

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