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
| Name | Required | Description | Default |
|---|---|---|---|
| hwnd | No | ||
| mode | No | background | |
| text | Yes | ||
| focus | No | ||
| clear_first | No | ||
| press_enter | No | ||
| allow_global | No | ||
| user_idle_ms | No | ||
| restore_focus | No | ||
| title_contains | No | ||
| respect_user_input | No | ||
| require_target_focus | No | ||
| wait_for_idle_seconds | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |