Skip to main content
Glama

type_text

Types text into Swing text fields, text areas, password fields, spinners, and editable combo boxes using real key events, replacing or appending content and optionally pressing Enter to submit.

Instructions

Type into a text field, text area, password field, spinner or editable combo box like a user: the field gets the focus (the previous field's input verifier runs; if it refuses, nothing is typed and the result says why), the old text is selected and each character is sent as real key events, so key listeners, document filters and formatters run. Replaces the content unless append=true; submit=true then presses Enter. "\n" types Enter and "\t" types Tab (moves to the next field). Formatted fields and spinners commit on Enter or when the focus leaves them. The application window does not need to be in front. mode=set sets the text directly without key events (faster, but skips key listeners). Waits first (up to timeoutMs) until the component is visible, enabled, editable where needed, and not blocked by a modal dialog or busy overlay, so no wait_for is needed for a component that is about to become usable. Returns the new snapshot.

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": {
      "ref": "<ref>",
      "text": "<text>"
    },
    "name": "type_text"
  }
}

Input Schema

NameRequiredDescriptionDefault
refYes
modeNokeys (default): key events inside the application; set: set the text directly; os: real keyboard through the operating system (brings the window to the front; rarely needed)
textYes
appendNoKeep the current text and type at its end
dialogNoAnswer the modal dialog this action opens with this button (text, or ok/yes/no/cancel); its message is reported. An error if no dialog opens within 3 s
submitNoPress Enter afterwards
timeoutMsNoHow long to wait for the component to become usable (default 10000)

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, the description carries the full behavioral burden and does so thoroughly: focus/input-verifier sequencing, that a refusal means nothing is typed and the reason is reported, that each character is a real key event firing listeners/filters/formatters, default replace-vs-append semantics, and special-character handling. It also discloses the built-in wait conditions and that the new snapshot is returned, which is exactly the mutation/side-effect detail an agent needs.

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 core action and its default replace behavior are front-loaded, followed by secondary details (escape sequences, formatted-field commit, mode alternatives, waiting). It is dense and the parenthetical about input verifiers is verbose, but nearly every sentence carries actionable information rather than filler.

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 7-parameter mutation tool with no annotations and no output schema, the description covers the key mechanics, waiting behavior, side effects on existing text, and explicitly states what is returned (the new snapshot). The only unaddressed item, the dialog parameter, is fully documented in the schema itself.

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 71%, and the description meaningfully supplements it: append=true is explained as keeping the existing text, submit=true as pressing Enter afterwards, timeoutMs as the usability wait bound, and text supports escape sequences \n and \t. The dialog parameter is not explained in the description, though the schema documents it adequately, so this is strong but not complete.

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 opening clause names a specific verb (type) and enumerates the exact widget types it targets (text field, text area, password field, spinner, editable combo box), plus 'like a user' to distinguish real key-event typing from programmatic setting. An agent can immediately tell this apart from press_key or select_option.

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 explicitly removes the need for a sibling call ('no wait_for is needed for a component that is about to become usable') and removes a common concern ('the application window does not need to be in front'), and it distinguishes mode=set (skips listeners, faster) from the default key-event mode. It does not explicitly route between type_text and press_key/select_option when both could apply, so it stops short of full when-not guidance.

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