Skip to main content
Glama

Type Text

type_text

Set, append, or clear text in input fields, textareas, and contenteditable elements. Choose fill, fast-type, or set-value modes to match the required interaction.

Instructions

Enter, append, directly set, or clear a value on a page element.

Use this tool to modify text/value fields such as inputs, textareas, contenteditable elements, and supported input sliders. It changes the target element's value or content; it does not submit a form or click other elements.

Choose the mode based on the desired interaction:

  • "fill_input": Normal user-like entry; clears the existing value first.

  • "append": Preserves the existing value and adds text via keystrokes.

  • "fast_type": Clears the existing value and types without typing pauses.

  • "set_value": Sets the value directly without simulating key events; prefer this for fast programmatic value changes when keyboard events are not required.

  • "clear_only": Clears the existing value; text is ignored.

The tool waits up to timeout seconds for the target element. If the target cannot be used successfully, the underlying SeleniumBase error is handled by handle_sb_errors rather than returning a success message.

Args: selector: CSS or SeleniumBase selector identifying the target element.

text: Text/value to enter or set. Ignored for "clear_only".

mode: Interaction mode. See the mode descriptions above.

timeout: Maximum seconds to wait for the target element.
    Must be appropriate for the page's expected load/interaction time.

Returns: A confirmation message after the operation succeeds; otherwise the error handler returns the resulting failure.

Notes: Including "\n" in your text (except in "set_value" mode) will simulate pressing the "Enter" key, which is useful for submitting forms or triggering search inputs without needing a separate click.

Tool selection: - Need to update text that appears in a text field -> use this tool. - Need to update the value of a element -> use select_option.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNofill_input
textNo
timeoutNo
selectorYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv4.54.0
    • changedInput schema / properties / timeout / default
      Previous value: -7New value: +5
  2. Changed2 schema fields changedv4.53.7
    • removedInput schema / properties / timeout / anyOf
      Removed value: -[
      -  {
      -    "type": "integer"
      -  },
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedInput schema / properties / timeout / type
      Added value: +"number"
  3. Addedv4.53.5
  4. Removedv1.0.1
  5. First observedv1.0.0

TDQS

A4.9/5.0
Behavior5/5

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

The description goes well beyond the annotations by disclosing that the tool does not submit forms or click elements, that different modes clear or preserve existing values, that Enter keystrokes can be simulated, and that failures are routed through handle_sb_errors. These behavioral details add significant context beyond readOnlyHint, openWorldHint, and destructiveHint.

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?

The description is detailed and well-structured, with clear sections for modes, arguments, returns, notes, and tool selection. It is somewhat longer than strictly necessary because some sections, like Args and Returns, overlap with the schema and output schema, but the length is justified by the tool's complexity.

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 tool with four parameters, five interaction modes, error-handling behavior, and sibling tools, the description covers everything an agent needs to invoke it correctly: target, text, mode, timeout, side effects, and when to choose an alternative. No important calling information 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?

Schema description coverage is 0%, so the description carries the full burden of explaining parameters. It thoroughly explains selector, text (including being ignored for clear_only), all five mode enum values, and timeout semantics, adding critical meaning the bare schema lacks.

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?

The description names a specific action set (enter, append, set, clear) and a specific resource (page element), and immediately distinguishes itself from siblings by stating it does not submit forms or click other elements. It also explicitly routes select-element updates to select_option, making the tool's scope unmistakable.

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?

The dedicated 'Tool selection' section explicitly says to use this tool for text-field updates and to use select_option for <select> elements. It also explains when each mode is appropriate, such as preferring 'set_value' for fast programmatic changes when keyboard events are not required.

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