Skip to main content
Glama

type_text

Types Unicode text into a target Windows window without stealing focus, using background posting, clipboard paste, or SendInput with focus verification.

Instructions

Type Unicode text safely. Requires hwnd/title_contains unless allow_global=True.

  • mode='background' (default): posts WM_CHAR directly to the target window without stealing focus.

  • mode='paste': clipboard paste guarded by User-Activity Guard + Strict Focus Lock + Focus Restore.

  • mode='sendinput': Unicode typing in 16-char chunks with focus verification before EVERY chunk.

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

Input Schema

NameRequiredDescriptionDefault
hwndNo
modeNobackground
textYes
focusNo
clear_firstNo
press_enterNo
allow_globalNo
user_idle_msNo
restore_focusNo
title_containsNo
respect_user_inputNo
require_target_focusNo
wait_for_idle_secondsNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.2

TDQS

B3.1/5.0
Behavior3/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 it does disclose meaningful traits: background mode avoids focus theft, paste mode is guarded by User-Activity Guard/Strict Focus Lock/Focus Restore, sendinput verifies focus per 16-char chunk. Yet several safety-relevant switches (respect_user_input, require_target_focus, clear_first, wait_for_idle_seconds, user_idle_ms) go unexplained, leaving notable behavioral gaps.

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?

Front-loads the purpose and targeting constraint, then uses a tight three-bullet breakdown for modes. Wording is efficient with no filler, though the mode bullets are slightly uneven in depth.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return values need not be described, but a 13-parameter tool with zero schema coverage and no annotations needs far more coverage of its behavioral flags than this provides. An agent could call it with the defaults but cannot reason about the safety knobs.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% across 13 parameters, so the description must compensate and largely does not. It only explains mode's three values and the hwnd/title_contains/allow_global relationship; clear_first, press_enter, focus, restore_focus, user_idle_ms and others get no meaning beyond their names.

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?

States a specific verb and resource ("Type Unicode text safely") and names the targeting precondition (hwnd/title_contains unless allow_global=True), which separates it from a plain key-press tool. It does not explicitly name siblings like press_keys or fill_form, so differentiation is by implication rather than declaration.

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

Usage Guidelines3/5

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

Gives a clear prerequisite for targeting (hwnd/title_contains vs allow_global=True), which is real when-to-use guidance. However, it never says when to prefer type_text over press_keys or fill_form, nor when to avoid it; the three modes are described by mechanism but not by selection criteria.

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