Skip to main content
Glama

Type Text

type_text

Enter, append, or clear text in input fields, textareas, and contenteditable elements. Choose fill, append, fast type, direct set, or clear mode to modify element values without submitting forms.

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.

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. First observedv0.1.0

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already indicate readOnly=false and destructiveHint=false, but the description adds meaningful behavior beyond that: it waits up to timeout seconds, it clears existing values in some modes, it preserves in another, and it routes failures through handle_sb_errors. These details inform the agent about timing, side effects, and error flow, which annotations do not cover.

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?

The description is longer than average but earned: five mutually exclusive modes require enumeration and disambiguation. It front-loads the core purpose, then logically progresses through behavior, mode selection, and arguments. Each bullet and sentence delivers distinct information with no filler or redundancy.

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 modes, an output schema, and zero schema-level descriptions, the description covers all essential dimensions: what it does, which element types it supports, what it avoids doing, mode selection, error handling, and parameter semantics. It also states the return contract ('confirmation message... otherwise the error handler returns the resulting failure'), so an agent can interpret the response correctly.

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 explanatory burden. It explains selector ('CSS or SeleniumBase selector'), text ('Ignored for

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 opens with specific verbs ('Enter, append, directly set, or clear') tied to a clear resource ('value on a page element'), and goes on to enumerate target element types ('inputs, textareas, contenteditable elements'). It explicitly states what the tool does not do ('does not submit a form or click other elements'), which differentiates it from siblings like click_element or select_option without opening their schemas.

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?

Provides explicit guidance on when to use the tool ('modify text/value fields'), and breaks down mode selection with expected interaction semantics. It also gives an exclusion ('does not submit or click'), strongly implying click_element is for clicking. It stops short of naming alternative sibling tools explicitly, but the context and exclusions are clear enough for an agent to decide.

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