Skip to main content
Glama

type_text

Types text into a GUI field via native SetValue without requiring foreground focus; falls back to key injection or optional clipboard paste when direct input is unsupported.

Instructions

Type text into a field. Uses native SetValue — foreground-independent. Falls back to key injection if the element doesn't support SetValue.

SetValue REPLACES the field's content. A window matched by title can be the user's own (single-instance apps such as Windows 11 Notepad reuse their open window), so type only into windows of a process you started.

paste=true also allows typing through the clipboard (Windows, macOS) when the other ways fail. The text is lent to the clipboard, marked out of clipboard history, and cleared afterwards if nothing replaced it; what the user had copied is lost, never restored. Password fields never paste.

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

Input Schema

NameRequiredDescriptionDefault
textYes
pasteNo
handle_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/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 burden and does so: it discloses the primary SetValue mechanism, foreground independence, key-injection fallback, and the critical fact that SetValue REPLACES existing field content. It also documents the clipboard side effects of paste=true in detail, including that the user's prior clipboard contents are permanently lost, are excluded from history, and that password fields never paste.

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 front-loaded with the primary mechanism and the most consequential warning (content replacement) before the fallback and clipboard caveats. Sentences are dense but each conveys distinct operational information; only the window-title aside is slightly discursive.

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?

For a three-parameter mutation tool with no annotations and no output schema, the description covers mechanism, fallbacks, destructive effects, and failure modes well. It stops short of stating what is returned on success/failure and leaves handle_id undefined, which matters for a required parameter.

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 0%, so the description must compensate, and it does for paste: it explains the trigger condition, platform scope (Windows, macOS), and side effects. text is self-evident, but handle_id — a required parameter — is never defined (window handle vs. element handle, and where to obtain it), leaving one gap.

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 line states a specific verb and target ("Type text into a field") and the body makes clear this is text entry rather than a click or keypress, which separates it from siblings like click, press_key, and click_at. An agent can identify the operation without opening the schema.

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 real selection criteria: use paste=true when the other input paths fail, and only type into windows of a process you started when matching by title. It does not name sibling tools as alternatives (e.g. press_key for shortcuts), so guidance is strong but not exhaustive.

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