Skip to main content
Glama

keyboard

Sends text and key combos to a target window: types strings, presses shortcuts like ctrl+c, or runs multi-step mnemonic sequences atomically after focusing that window.

Instructions

Purpose: Send keyboard input to a window: 'type' for text, 'press' for key combos, 'sequence' for atomic multi-step chords. Details: action='type' inserts text (auto-clipboard for non-ASCII, bypassing IME conversion). action='press' sends key combos like 'ctrl+c'/'alt+tab'. action='sequence' runs ordered steps in one keyboard lock — use for Alt+letter, letter mnemonic chains where intermediate tool calls would close the menu. windowTitle or hwnd is REQUIRED (blank/whitespace counts as neither) — the server focuses that window first, and a call with neither stops with DestinationRequired before any key is sent. Use windowTitle:'@active' to aim at the foreground window on purpose; an hwnd naming a titleless window works only while that window is already foreground. DESKTOP_TOUCH_REQUIRE_DESTINATION=0 downgrades the stop to a warning. Prefer: Set lensId for perception guards. Use desktop_act({action:'setValue'}) for UIA ValuePattern text fields. Caveats: win+r/win+x/win+s/win+l blocked. action='type' does not handle CJK IME composition — use use_clipboard=true or desktop_act({action:'setValue'}); neither lands while an IME composition is pending — commit or cancel it first. hints.clipboard says the backend and if the clipboard was restored. Non-ASCII text (CJK, emoji, diacritics, smart quotes) auto-clipboards, as keystrokes drop it or trigger Chrome accelerators; pass forceKeystrokes:true to disable. Background (PostMessage/WM_CHAR) auto-engages for classic console windows (cmd / PowerShell in conhost); DTM_BG_AUTO=1 enables globally. Windows Terminal: foreground, checked as terminal is (WindowsTerminalTargetUnsafe). Foreground non-terminal type runs a per-chunk leash; user focus-steal mid-stream aborts with FocusLostDuringType + context.typed/remaining; pass abortOnFocusLoss:false to disable. BG type verifies WM_CHAR via UIA TextPattern read-back; mismatch returns BackgroundInputNotDelivered. BG press read-back is scoped to terminal-class + enter/tab/arrow; other combos return verifyDelivery:'unverifiable', failure returns BackgroundKeyNotDelivered. action='sequence' is FG-only (BG/foreground_flash schema-rejected); emits verifyDelivery:'focus_only'; mid-loop focus theft returns MenuFocusLostMidSequence + context.remaining: Step[]. Win11 FG refusal returns ForegroundRestricted — terminal-class targets auto-engage BG (except a combo with ctrl/shift/alt and type with replaceAll, which go through FG and can return ForegroundRestricted too); non-terminal switch to desktop_act / click_element. Off-desktop target → WindowOnOtherDesktop. Window disabled by its dialog → WindowBlockedByDialog. Examples: keyboard({action:'type', text:'hello', windowTitle:'Untitled - Notepad'}) → text injected (guarded) keyboard({action:'type', text:'hello', windowTitle:'@active'}) → typed into the foreground window keyboard({action:'press', keys:'ctrl+c', windowTitle:'Untitled - Notepad'}) → copy keyboard({action:'press', keys:'escape', windowTitle:'Dialog'}) → dismiss dialog keyboard({action:'sequence', steps:[{keys:'alt+i', gapMs:100},{keys:'m'}], windowTitle:'Microsoft Visual Basic'}) → Insert > Module (atomic)

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": {
      "action": "<action>"
    },
    "name": "keyboard"
  }
}

Input Schema

NameRequiredDescriptionDefault
hwndNoDirect window handle ID (takes precedence over windowTitle). Either this or windowTitle is required. Obtain from desktop_discover response (windows[].hwnd). String type to avoid 64-bit precision issues. A window that has no title can be addressed this way, but only while it is already the foreground window — keyboard focus and guarding cannot target a titleless window yet.
keysNoKey combo string, e.g. 'ctrl+c', 'alt+tab', 'enter', 'ctrl+shift+s'. Note: win+r, win+x, win+s, win+l are blocked for security.
textNoThe text to type (max 10,000 characters)
fixIdNo'type': Approve a pending suggestedFix (one-shot, 15s TTL). Pass the fixId returned by a previous failed keyboard(action='type') to re-attempt with guard-validated args. 'sequence': Approve a pending suggestedFix (one-shot, 15s TTL). Only meaningful for GUARD-pre-loop rejections (e.g. unsafe.keyboardTarget). Mid-loop MenuFocusLostMidSequence does NOT issue fixIds — recover by re-calling with context.remaining.
stepsNoOrdered list of key-press steps. Min 1, max 16. Total duration must not exceed 5000ms (excludes settleMs and focus acquisition). N=1 is allowed but inherits the sequence verification contract (hints.verifyDelivery.status='focus_only'); if you want the stricter keyboard:press contract, call keyboard({action:'press', keys}) directly (issue #278, matrix doc §3.1).
actionYesAction selector — one of: type, press, sequence. Per-action required fields are enforced at call time (see the tool description); this flat schema lists every action's fields as optional.
lensIdNo'type': Optional perception lens ID. Guards (safe.keyboardTarget) are evaluated before typing, and a perception envelope is attached to post.perception on success. 'press': Optional perception lens ID. Guards (safe.keyboardTarget) are evaluated before the key press. 'sequence': Optional perception lens ID. Guards (safe.keyboardTarget) are evaluated once before the first step.
methodNo'type' / 'press': Input routing channel. 'auto' uses background (PostMessage) when the target window is a classic console (cmd / PowerShell in conhost) OR DTM_BG_AUTO=1 is set; else foreground (Windows Terminal takes no background input). Terminal auto-detect is HWND-targeted so user-side focus changes mid-stream cannot divert keystrokes (except a combo with ctrl/shift/alt, or type with replaceAll, which 'auto' sends through the foreground). 'background' forces PostMessage-only (no focus change, fails on Chromium/IME). A key combo with ctrl, shift or alt, and type's replaceAll (which selects with Ctrl+A), cannot be posted — the app would see the plain key and type it — so 'background' refuses them with BackgroundModifierComboUnsupported and nothing is sent; 'auto' sends them through the foreground. 'foreground' forces the current behavior (SetForegroundWindow + keystrokes). 'foreground_flash' (ADR-013 Option E) is an explicit opt-in 妥協 BG path for Windows Terminal: temporarily steals foreground (~50-80ms), pastes via clipboard, sends Ctrl+V, restores foreground + clipboard. Single-line + < 5KiB only. Carries `typingLeakRisk: true` in hints because user keystrokes during the flash window can leak to WT. Default 'auto'. 'sequence': Sequence is foreground-only by design — Alt-menu mnemonics need real SendInput. Omit, or pass 'foreground'. method:'background' / 'foreground_flash' are rejected at schema parse time (typed codes BackgroundNotApplicableToSequence / ForegroundFlashNotApplicableToSequence document the rationale for LLMs).
includeNoOptional response-shape opt-in. `['envelope']` returns the self-documenting envelope (`_version` / `data` / `as_of` / `confidence`). `['raw']` forces raw shape (overrides DESKTOP_TOUCH_ENVELOPE=1 server default). Default behaviour is raw shape (compat with existing clients).
narrateNoNarration level. "rich": include UIA diff in post.rich (appeared/disappeared/valueDeltas, and nameDeltas when an element's name changed, such as a calculator display) — usually removes the need for a verification screenshot. It is withheld, with post.rich.diffDegraded saying why, when the diff cannot be shown to describe the window that was acted on. On click_element and keyboard (and set_element_value where the server registers it), which resolve the target window before acting: another open window's title contains the text this call resolved to, whether you named the hwnd or the server did — "@active" and the dialog rescue both resolve one ("ambiguous_title"); or the target moved between the snapshot and the action ("target_changed"). On those and on mouse_click, retrying with a fixId also withholds it, because the stored fix names a window this cannot see ("fix_target_unknown") — browser tools keep their diff on a fixId retry, because theirs is a tab diff and does not depend on a window title. mouse_click and mouse_drag accept an hwnd and still take their snapshots by windowTitle, so nothing else is withheld for them: verify those with a screenshot. A window too large to read whole is withheld too ("tree_truncated"). The action itself is unaffected in every case; only the diff is. Default: "minimal".minimal
settleMsNoMilliseconds to wait after the action before checking foreground window (default 300).
forceFocusNoWhen true, bypass Windows foreground-stealing protection via AttachThreadInput before focusing the target window. Default: follows env DESKTOP_TOUCH_FORCE_FOCUS (default false).
replaceAllNoWhen true, send Ctrl+A to select all existing text before typing. Equivalent to Ctrl+A → keyboard(action='type') in one call (requires field already focused). Default false.
trackFocusNoWhen true (default), detect if focus was stolen from the target window after the action. Reports focusLost in the response. Set false to skip.
forceImeOffNo'type': Issue #245 系統②: when true, query the target window's IME open-status via Imm32 before typing; if ON, switch OFF for the duration of this call and restore the prior state in `finally`. Prevents silent romaji conversion when the user's Japanese IME is active but the LLM is typing ASCII commands. Requires `windowTitle` or `hwnd` (otherwise no target to query). Default false — existing use_clipboard auto-promotion still handles non-ASCII symbols transparently. No-op when the addon predates the IMM bridge (call proceeds with whatever IME state is in effect). 'sequence': Issue #245 系統②: query the target's IME open-status before the first step; if ON, switch OFF for the whole sequence and restore in finally. Prevents Alt-mnemonic hijack when 日本語 IME is active (the OS routes Alt+letter to IME composition instead of the menu). Requires windowTitle or hwnd. Default false.
windowTitleNoPartial title of the window that should receive the keystrokes. Required unless you pass hwnd: a call with neither stops with DestinationRequired before any key is sent, and an empty or whitespace-only value counts as neither. The server focuses this window before typing and uses it as the expected target for focusLost detection. Use '@active' to target the current foreground window on purpose.
use_clipboardNoIf true, copy text to clipboard and paste with Ctrl+V instead of simulating keystrokes. Use this when typing URLs, paths, or ASCII text into apps with Japanese IME active — pasted text is not run through IME conversion. Note this does not help while an IME composition is already in progress: the paste keystroke is consumed by the IME and nothing is inserted, though the call still answers ok, so commit or cancel the composition first; when the IME was on at the paste, hints.clipboard.imeOpen says so. Your clipboard is replaced for the duration of the call and put back afterwards; hints.clipboard reports which backend served the paste and whether the restore ran. On builds without the native addon this path is capped at about 12000 characters and fails with code:'ClipboardWriteTooLargeForFallback' above it. Default false.
forceKeystrokesNoWhen true, always use keystroke mode even if text contains non-ASCII content (CJK, emoji, diacritics, em-dash, smart quotes, etc.) that would normally trigger auto-clipboard. Default false — auto-clipboard is enabled.
abortOnFocusLossNoFocus Leash Phase B: when true, the foreground keystroke send is split into chunks (default 8 chars; override via DTM_LEASH_CHUNK_SIZE env) and the target window's foreground state is verified between chunks. If the user grabs focus mid-stream, the call aborts and returns FocusLostDuringType with context.typed (chars delivered to target) and context.remaining (unsent tail) so the caller can re-focus and retry the unsent portion. Default: true when windowTitle is provided, false otherwise. Has no effect on the clipboard path (atomic Ctrl+V) or the BG (WM_CHAR) path (HWND-targeted, foreground-independent).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv2.4.1
    • changedInput schema / properties / method / description
      Previous value: -"'type' / 'press': Input routing channel. 'auto' uses background (PostMessage) when the target window is a known terminal class (Windows Terminal / cmd / PowerShell) OR DTM_BG_AUTO=1 is set; else foreground. Terminal auto-detect is HWND-targeted so user-side focus changes mid-stream cannot divert keystrokes (except a combo with ctrl/shift/alt, or type with replaceAll, which 'auto' sends through the foreground). 'background' forces PostMessage-only (no focus change, fails on Chromium/IME). A key combo with ctrl, shift or alt, and type's replaceAll (which selects with Ctrl+A), cannot be posted — the app would see the plain key and type it — so 'background' refuses them with BackgroundModifierComboUnsupported and nothing is sent; 'auto' sends them through the foreground. 'foreground' forces the current behavior (SetForegroundWindow + keystrokes). 'foreground_flash' (ADR-013 Option E) is an explicit opt-in 妥協 BG path for Windows Terminal: temporarily steals foreground (~50-80ms), pastes via clipboard, sends Ctrl+V, restores foreground + clipboard. Single-line + < 5KiB only. Carries `typingLeakRisk: true` in hints because user keystrokes during the flash window can leak to WT. Default 'auto'.\n'sequence': Sequence is foreground-only by design — Alt-menu mnemonics need real SendInput. Omit, or pass 'foreground'. method:'background' / 'foreground_flash' are rejected at schema parse time (typed codes BackgroundNotApplicableToSequence / ForegroundFlashNotApplicableToSequence document the rationale for LLMs)."New value: +"'type' / 'press': Input routing channel. 'auto' uses background (PostMessage) when the target window is a classic console (cmd / PowerShell in conhost) OR DTM_BG_AUTO=1 is set; else foreground (Windows Terminal takes no background input). Terminal auto-detect is HWND-targeted so user-side focus changes mid-stream cannot divert keystrokes (except a combo with ctrl/shift/alt, or type with replaceAll, which 'auto' sends through the foreground). 'background' forces PostMessage-only (no focus change, fails on Chromium/IME). A key combo with ctrl, shift or alt, and type's replaceAll (which selects with Ctrl+A), cannot be posted — the app would see the plain key and type it — so 'background' refuses them with BackgroundModifierComboUnsupported and nothing is sent; 'auto' sends them through the foreground. 'foreground' forces the current behavior (SetForegroundWindow + keystrokes). 'foreground_flash' (ADR-013 Option E) is an explicit opt-in 妥協 BG path for Windows Terminal: temporarily steals foreground (~50-80ms), pastes via clipboard, sends Ctrl+V, restores foreground + clipboard. Single-line + < 5KiB only. Carries `typingLeakRisk: true` in hints because user keystrokes during the flash window can leak to WT. Default 'auto'.\n'sequence': Sequence is foreground-only by design — Alt-menu mnemonics need real SendInput. Omit, or pass 'foreground'. method:'background' / 'foreground_flash' are rejected at schema parse time (typed codes BackgroundNotApplicableToSequence / ForegroundFlashNotApplicableToSequence document the rationale for LLMs)."
  2. Changed16 schema fields changedv2.3.1
    • addedInput schema / $schema
      Added value: +"http://json-schema.org/draft-07/schema#"
    • removedInput schema / additionalProperties
      Removed value: -false
    • changedInput schema / properties / fixId / description
      Previous value: -"Approve a pending suggestedFix (one-shot, 15s TTL). Pass the fixId returned by a previous failed keyboard(action='type') to re-attempt with guard-validated args."New value: +"'type': Approve a pending suggestedFix (one-shot, 15s TTL). Pass the fixId returned by a previous failed keyboard(action='type') to re-attempt with guard-validated args.\n'sequence': Approve a pending suggestedFix (one-shot, 15s TTL). Only meaningful for GUARD-pre-loop rejections (e.g. unsafe.keyboardTarget). Mid-loop MenuFocusLostMidSequence does NOT issue fixIds — recover by re-calling with context.remaining."
    • changedInput schema / properties / forceFocus / description
      Previous value: -"Bypass Windows foreground-stealing protection before focusing."New value: +"When true, bypass Windows foreground-stealing protection via AttachThreadInput before focusing the target window. Default: follows env DESKTOP_TOUCH_FORCE_FOCUS (default false)."
    • changedInput schema / properties / forceImeOff / description
      Previous value: -"Issue #245 系統②: when true, query the target window's IME open-status via Imm32 before typing; if ON, switch OFF for the duration of this call and restore the prior state in `finally`. Prevents silent romaji conversion when the user's Japanese IME is active but the LLM is typing ASCII commands. Requires `windowTitle` or `hwnd` (otherwise no target to query). Default false — existing use_clipboard auto-promotion still handles non-ASCII symbols transparently. No-op when the addon predates the IMM bridge (call proceeds with whatever IME state is in effect)."New value: +"'type': Issue #245 系統②: when true, query the target window's IME open-status via Imm32 before typing; if ON, switch OFF for the duration of this call and restore the prior state in `finally`. Prevents silent romaji conversion when the user's Japanese IME is active but the LLM is typing ASCII commands. Requires `windowTitle` or `hwnd` (otherwise no target to query). Default false — existing use_clipboard auto-promotion still handles non-ASCII symbols transparently. No-op when the addon predates the IMM bridge (call proceeds with whatever IME state is in effect).\n'sequence': Issue #245 系統②: query the target's IME open-status before the first step; if ON, switch OFF for the whole sequence and restore in finally. Prevents Alt-mnemonic hijack when 日本語 IME is active (the OS routes Alt+letter to IME composition instead of the menu). Requires windowTitle or hwnd. Default false."
    • changedInput schema / properties / hwnd / description
      Previous value: -"Direct window handle ID (takes precedence over windowTitle). Obtain from get_windows response (hwnd field). String type to avoid 64-bit precision issues."New value: +"Direct window handle ID (takes precedence over windowTitle). Either this or windowTitle is required. Obtain from desktop_discover response (windows[].hwnd). String type to avoid 64-bit precision issues. A window that has no title can be addressed this way, but only while it is already the foreground window — keyboard focus and guarding cannot target a titleless window yet."
    • changedInput schema / properties / lensId / description
      Previous value: -"Optional perception lens ID. Guards (safe.keyboardTarget) are evaluated before typing, and a perception envelope is attached to post.perception on success."New value: +"'type': Optional perception lens ID. Guards (safe.keyboardTarget) are evaluated before typing, and a perception envelope is attached to post.perception on success.\n'press': Optional perception lens ID. Guards (safe.keyboardTarget) are evaluated before the key press.\n'sequence': Optional perception lens ID. Guards (safe.keyboardTarget) are evaluated once before the first step."
    • addedInput schema / properties / method / anyOf
      Added value: +[
      +  {
      +    "enum": [
      +      "auto",
      +      "background",
      +      "foreground",
      +      "foreground_flash"
      +    ],
      +    "type": "string"
      +  },
      +  {
      +    "const": "foreground",
      +    "type": "string"
      +  }
      +]
    • removedInput schema / properties / method / default
      Removed value: -"auto"
    • changedInput schema / properties / method / description
      Previous value: -"Input method. background = WM_CHAR PostMessage (no focus change); foreground = SendInput (current default); auto = pick automatically."New value: +"'type' / 'press': Input routing channel. 'auto' uses background (PostMessage) when the target window is a known terminal class (Windows Terminal / cmd / PowerShell) OR DTM_BG_AUTO=1 is set; else foreground. Terminal auto-detect is HWND-targeted so user-side focus changes mid-stream cannot divert keystrokes (except a combo with ctrl/shift/alt, or type with replaceAll, which 'auto' sends through the foreground). 'background' forces PostMessage-only (no focus change, fails on Chromium/IME). A key combo with ctrl, shift or alt, and type's replaceAll (which selects with Ctrl+A), cannot be posted — the app would see the plain key and type it — so 'background' refuses them with BackgroundModifierComboUnsupported and nothing is sent; 'auto' sends them through the foreground. 'foreground' forces the current behavior (SetForegroundWindow + keystrokes). 'foreground_flash' (ADR-013 Option E) is an explicit opt-in 妥協 BG path for Windows Terminal: temporarily steals foreground (~50-80ms), pastes via clipboard, sends Ctrl+V, restores foreground + clipboard. Single-line + < 5KiB only. Carries `typingLeakRisk: true` in hints because user keystrokes during the flash window can leak to WT. Default 'auto'.\n'sequence': Sequence is foreground-only by design — Alt-menu mnemonics need real SendInput. Omit, or pass 'foreground'. method:'background' / 'foreground_flash' are rejected at schema parse time (typed codes BackgroundNotApplicableToSequence / ForegroundFlashNotApplicableToSequence document the rationale for LLMs)."
    • removedInput schema / properties / method / enum
      Removed value: -[
      -  "auto",
      -  "background",
      -  "foreground"
      -]
    • removedInput schema / properties / method / type
      Removed value: -"string"
    • changedInput schema / properties / narrate / description
      Previous value: -"Narration level. rich includes UIA or browser state diff when supported, and is withheld with post.rich.diffDegraded when the diff cannot be shown to describe the window that was acted on."New value: +"Narration level. \"rich\": include UIA diff in post.rich (appeared/disappeared/valueDeltas, and nameDeltas when an element's name changed, such as a calculator display) — usually removes the need for a verification screenshot. It is withheld, with post.rich.diffDegraded saying why, when the diff cannot be shown to describe the window that was acted on. On click_element and keyboard (and set_element_value where the server registers it), which resolve the target window before acting: another open window's title contains the text this call resolved to, whether you named the hwnd or the server did — \"@active\" and the dialog rescue both resolve one (\"ambiguous_title\"); or the target moved between the snapshot and the action (\"target_changed\"). On those and on mouse_click, retrying with a fixId also withholds it, because the stored fix names a window this cannot see (\"fix_target_unknown\") — browser tools keep their diff on a fixId retry, because theirs is a tab diff and does not depend on a window title. mouse_click and mouse_drag accept an hwnd and still take their snapshots by windowTitle, so nothing else is withheld for them: verify those with a screenshot. A window too large to read whole is withheld too (\"tree_truncated\"). The action itself is unaffected in every case; only the diff is. Default: \"minimal\"."
    • changedInput schema / properties / settleMs / description
      Previous value: -"Milliseconds to wait before checking post-action state."New value: +"Milliseconds to wait after the action before checking foreground window (default 300)."
    • changedInput schema / properties / trackFocus / description
      Previous value: -"Detect if focus was stolen after the action."New value: +"When true (default), detect if focus was stolen from the target window after the action. Reports focusLost in the response. Set false to skip."
    • changedInput schema / properties / windowTitle / description
      Previous value: -"Partial title of the window that should receive keyboard input."New value: +"Partial title of the window that should receive the keystrokes. Required unless you pass hwnd: a call with neither stops with DestinationRequired before any key is sent, and an empty or whitespace-only value counts as neither. The server focuses this window before typing and uses it as the expected target for focusLost detection. Use '@active' to target the current foreground window on purpose."
  3. Changed1 schema field changedv2.2.0
    • changedInput schema / properties / use_clipboard / description
      Previous value: -"If true, copy text to clipboard and paste with Ctrl+V instead of simulating keystrokes. Use this when typing URLs, paths, or ASCII text into apps with Japanese IME active — pasted text is not run through IME conversion. Note this does not help while an IME composition is already in progress: the paste keystroke is consumed by the IME and nothing is inserted, so commit or cancel the composition first. Your clipboard is replaced for the duration of the call and put back afterwards; hints.clipboard reports which backend served the paste and whether the restore ran. On builds without the native addon this path is capped at about 12000 characters and fails with code:'ClipboardWriteTooLargeForFallback' above it. Default false."New value: +"If true, copy text to clipboard and paste with Ctrl+V instead of simulating keystrokes. Use this when typing URLs, paths, or ASCII text into apps with Japanese IME active — pasted text is not run through IME conversion. Note this does not help while an IME composition is already in progress: the paste keystroke is consumed by the IME and nothing is inserted, though the call still answers ok, so commit or cancel the composition first; when the IME was on at the paste, hints.clipboard.imeOpen says so. Your clipboard is replaced for the duration of the call and put back afterwards; hints.clipboard reports which backend served the paste and whether the restore ran. On builds without the native addon this path is capped at about 12000 characters and fails with code:'ClipboardWriteTooLargeForFallback' above it. Default false."
  4. Changed1 schema field changedv2.0.0
    • changedInput schema / properties / narrate / description
      Previous value: -"Narration level. rich includes UIA or browser state diff when supported."New value: +"Narration level. rich includes UIA or browser state diff when supported, and is withheld with post.rich.diffDegraded when the diff cannot be shown to describe the window that was acted on."
  5. Changed1 schema field changedv1.14.3
    • changedInput schema / properties / use_clipboard / description
      Previous value: -"If true, copy text to clipboard and paste with Ctrl+V instead of simulating keystrokes. Use this when typing URLs, paths, or ASCII text into apps with Japanese IME active — prevents IME from converting characters. Default false."New value: +"If true, copy text to clipboard and paste with Ctrl+V instead of simulating keystrokes. Use this when typing URLs, paths, or ASCII text into apps with Japanese IME active — pasted text is not run through IME conversion. Note this does not help while an IME composition is already in progress: the paste keystroke is consumed by the IME and nothing is inserted, so commit or cancel the composition first. Your clipboard is replaced for the duration of the call and put back afterwards; hints.clipboard reports which backend served the paste and whether the restore ran. On builds without the native addon this path is capped at about 12000 characters and fails with code:'ClipboardWriteTooLargeForFallback' above it. Default false."
  6. Addedv1.12.0
  7. Removedv1.10.4
  8. Addedv1.9.2
  9. Removedv1.8.0
  10. Addedv1.6.0
  11. Removedv1.5.1
  12. Addedv1.5.0
  13. Removedv1.4.3
  14. Addedv1.4.2
  15. Removedv1.4.0
  16. Changed1 schema field changedv1.2.1
    • changedInput schema / oneOf
      Previous value: -[
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "abortOnFocusLoss": {
      -        "description": "Focus Leash Phase B: when true, the foreground keystroke send is split into chunks (default 8 chars; override via DTM_LEASH_CHUNK_SIZE env) and the target window's foreground state is verified between chunks. If the user grabs focus mid-stream, the call aborts and returns FocusLostDuringType with context.typed (chars delivered to target) and context.remaining (unsent tail) so the caller can re-focus and retry the unsent portion. Default: true when windowTitle is provided, false otherwise. Has no effect on the clipboard path (atomic Ctrl+V) or the BG (WM_CHAR) path (HWND-targeted, foreground-independent).",
      -        "type": "boolean"
      -      },
      -      "action": {
      -        "const": "type"
      -      },
      -      "fixId": {
      -        "description": "Approve a pending suggestedFix (one-shot, 15s TTL). Pass the fixId returned by a previous failed keyboard(action='type') to re-attempt with guard-validated args.",
      -        "type": "string"
      -      },
      -      "forceFocus": {
      -        "description": "Bypass Windows foreground-stealing protection before focusing.",
      -        "type": "boolean"
      -      },
      -      "forceKeystrokes": {
      -        "default": false,
      -        "description": "When true, always use keystroke mode even if text contains non-ASCII symbols (em-dash, en-dash, smart quotes, etc.) that would normally trigger auto-clipboard. Default false — auto-clipboard is enabled.",
      -        "type": "boolean"
      -      },
      -      "hwnd": {
      -        "description": "Direct window handle ID (takes precedence over windowTitle). Obtain from get_windows response (hwnd field). String type to avoid 64-bit precision issues.",
      -        "type": "string"
      -      },
      -      "lensId": {
      -        "description": "Optional perception lens ID. Guards (safe.keyboardTarget) are evaluated before typing, and a perception envelope is attached to post.perception on success.",
      -        "type": "string"
      -      },
      -      "method": {
      -        "default": "auto",
      -        "description": "Input method. background = WM_CHAR PostMessage (no focus change); foreground = SendInput (current default); auto = pick automatically.",
      -        "enum": [
      -          "auto",
      -          "background",
      -          "foreground"
      -        ],
      -        "type": "string"
      -      },
      -      "narrate": {
      -        "default": "minimal",
      -        "description": "Narration level. rich includes UIA or browser state diff when supported.",
      -        "enum": [
      -          "minimal",
      -          "rich"
      -        ],
      -        "type": "string"
      -      },
      -      "replaceAll": {
      -        "default": false,
      -        "description": "When true, send Ctrl+A to select all existing text before typing. Equivalent to Ctrl+A → keyboard(action='type') in one call (requires field already focused). Default false.",
      -        "type": "boolean"
      -      },
      -      "settleMs": {
      -        "default": 300,
      -        "description": "Milliseconds to wait before checking post-action state.",
      -        "maximum": 2000,
      -        "minimum": 0,
      -        "type": "integer"
      -      },
      -      "text": {
      -        "description": "The text to type (max 10,000 characters)",
      -        "maxLength": 10000,
      -        "type": "string"
      -      },
      -      "trackFocus": {
      -        "default": true,
      -        "description": "Detect if focus was stolen after the action.",
      -        "type": "boolean"
      -      },
      -      "use_clipboard": {
      -        "default": false,
      -        "description": "If true, copy text to clipboard and paste with Ctrl+V instead of simulating keystrokes. Use this when typing URLs, paths, or ASCII text into apps with Japanese IME active — prevents IME from converting characters. Default false.",
      -        "type": "boolean"
      -      },
      -      "windowTitle": {
      -        "description": "Partial title of the window that should receive keyboard input.",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "action",
      -      "text"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "action": {
      -        "const": "press"
      -      },
      -      "forceFocus": {
      -        "description": "Bypass Windows foreground-stealing protection before focusing.",
      -        "type": "boolean"
      -      },
      -      "hwnd": {
      -        "description": "Direct window handle ID (takes precedence over windowTitle). Obtain from get_windows response (hwnd field). String type to avoid 64-bit precision issues.",
      -        "type": "string"
      -      },
      -      "keys": {
      -        "description": "Key combo string, e.g. 'ctrl+c', 'alt+tab', 'enter', 'ctrl+shift+s'. Note: win+r, win+x, win+s, win+l are blocked for security.",
      -        "maxLength": 100,
      -        "type": "string"
      -      },
      -      "lensId": {
      -        "description": "Optional perception lens ID. Guards (safe.keyboardTarget) are evaluated before the key press.",
      -        "type": "string"
      -      },
      -      "method": {
      -        "default": "auto",
      -        "description": "Input method. background = WM_CHAR PostMessage (no focus change); foreground = SendInput (current default); auto = pick automatically.",
      -        "enum": [
      -          "auto",
      -          "background",
      -          "foreground"
      -        ],
      -        "type": "string"
      -      },
      -      "narrate": {
      -        "default": "minimal",
      -        "description": "Narration level. rich includes UIA or browser state diff when supported.",
      -        "enum": [
      -          "minimal",
      -          "rich"
      -        ],
      -        "type": "string"
      -      },
      -      "settleMs": {
      -        "default": 300,
      -        "description": "Milliseconds to wait before checking post-action state.",
      -        "maximum": 2000,
      -        "minimum": 0,
      -        "type": "integer"
      -      },
      -      "trackFocus": {
      -        "default": true,
      -        "description": "Detect if focus was stolen after the action.",
      -        "type": "boolean"
      -      },
      -      "windowTitle": {
      -        "description": "Partial title of the window that should receive keyboard input.",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "action",
      -      "keys"
      -    ],
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "abortOnFocusLoss": {
      +        "description": "Focus Leash Phase B: when true, the foreground keystroke send is split into chunks (default 8 chars; override via DTM_LEASH_CHUNK_SIZE env) and the target window's foreground state is verified between chunks. If the user grabs focus mid-stream, the call aborts and returns FocusLostDuringType with context.typed (chars delivered to target) and context.remaining (unsent tail) so the caller can re-focus and retry the unsent portion. Default: true when windowTitle is provided, false otherwise. Has no effect on the clipboard path (atomic Ctrl+V) or the BG (WM_CHAR) path (HWND-targeted, foreground-independent).",
      +        "type": "boolean"
      +      },
      +      "action": {
      +        "const": "type"
      +      },
      +      "fixId": {
      +        "description": "Approve a pending suggestedFix (one-shot, 15s TTL). Pass the fixId returned by a previous failed keyboard(action='type') to re-attempt with guard-validated args.",
      +        "type": "string"
      +      },
      +      "forceFocus": {
      +        "description": "Bypass Windows foreground-stealing protection before focusing.",
      +        "type": "boolean"
      +      },
      +      "forceKeystrokes": {
      +        "default": false,
      +        "description": "When true, always use keystroke mode even if text contains non-ASCII symbols (em-dash, en-dash, smart quotes, etc.) that would normally trigger auto-clipboard. Default false — auto-clipboard is enabled.",
      +        "type": "boolean"
      +      },
      +      "hwnd": {
      +        "description": "Direct window handle ID (takes precedence over windowTitle). Obtain from get_windows response (hwnd field). String type to avoid 64-bit precision issues.",
      +        "type": "string"
      +      },
      +      "include": {
      +        "description": "Optional response-shape opt-in. `['envelope']` returns the self-documenting envelope (`_version` / `data` / `as_of` / `confidence`). `['raw']` forces raw shape (overrides DESKTOP_TOUCH_ENVELOPE=1 server default). Default behaviour is raw shape (compat with existing clients).",
      +        "items": {
      +          "type": "string"
      +        },
      +        "type": "array"
      +      },
      +      "lensId": {
      +        "description": "Optional perception lens ID. Guards (safe.keyboardTarget) are evaluated before typing, and a perception envelope is attached to post.perception on success.",
      +        "type": "string"
      +      },
      +      "method": {
      +        "default": "auto",
      +        "description": "Input method. background = WM_CHAR PostMessage (no focus change); foreground = SendInput (current default); auto = pick automatically.",
      +        "enum": [
      +          "auto",
      +          "background",
      +          "foreground"
      +        ],
      +        "type": "string"
      +      },
      +      "narrate": {
      +        "default": "minimal",
      +        "description": "Narration level. rich includes UIA or browser state diff when supported.",
      +        "enum": [
      +          "minimal",
      +          "rich"
      +        ],
      +        "type": "string"
      +      },
      +      "replaceAll": {
      +        "default": false,
      +        "description": "When true, send Ctrl+A to select all existing text before typing. Equivalent to Ctrl+A → keyboard(action='type') in one call (requires field already focused). Default false.",
      +        "type": "boolean"
      +      },
      +      "settleMs": {
      +        "default": 300,
      +        "description": "Milliseconds to wait before checking post-action state.",
      +        "maximum": 2000,
      +        "minimum": 0,
      +        "type": "integer"
      +      },
      +      "text": {
      +        "description": "The text to type (max 10,000 characters)",
      +        "maxLength": 10000,
      +        "type": "string"
      +      },
      +      "trackFocus": {
      +        "default": true,
      +        "description": "Detect if focus was stolen after the action.",
      +        "type": "boolean"
      +      },
      +      "use_clipboard": {
      +        "default": false,
      +        "description": "If true, copy text to clipboard and paste with Ctrl+V instead of simulating keystrokes. Use this when typing URLs, paths, or ASCII text into apps with Japanese IME active — prevents IME from converting characters. Default false.",
      +        "type": "boolean"
      +      },
      +      "windowTitle": {
      +        "description": "Partial title of the window that should receive keyboard input.",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "action",
      +      "text"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "action": {
      +        "const": "press"
      +      },
      +      "forceFocus": {
      +        "description": "Bypass Windows foreground-stealing protection before focusing.",
      +        "type": "boolean"
      +      },
      +      "hwnd": {
      +        "description": "Direct window handle ID (takes precedence over windowTitle). Obtain from get_windows response (hwnd field). String type to avoid 64-bit precision issues.",
      +        "type": "string"
      +      },
      +      "include": {
      +        "description": "Optional response-shape opt-in. `['envelope']` returns the self-documenting envelope (`_version` / `data` / `as_of` / `confidence`). `['raw']` forces raw shape (overrides DESKTOP_TOUCH_ENVELOPE=1 server default). Default behaviour is raw shape (compat with existing clients).",
      +        "items": {
      +          "type": "string"
      +        },
      +        "type": "array"
      +      },
      +      "keys": {
      +        "description": "Key combo string, e.g. 'ctrl+c', 'alt+tab', 'enter', 'ctrl+shift+s'. Note: win+r, win+x, win+s, win+l are blocked for security.",
      +        "maxLength": 100,
      +        "type": "string"
      +      },
      +      "lensId": {
      +        "description": "Optional perception lens ID. Guards (safe.keyboardTarget) are evaluated before the key press.",
      +        "type": "string"
      +      },
      +      "method": {
      +        "default": "auto",
      +        "description": "Input method. background = WM_CHAR PostMessage (no focus change); foreground = SendInput (current default); auto = pick automatically.",
      +        "enum": [
      +          "auto",
      +          "background",
      +          "foreground"
      +        ],
      +        "type": "string"
      +      },
      +      "narrate": {
      +        "default": "minimal",
      +        "description": "Narration level. rich includes UIA or browser state diff when supported.",
      +        "enum": [
      +          "minimal",
      +          "rich"
      +        ],
      +        "type": "string"
      +      },
      +      "settleMs": {
      +        "default": 300,
      +        "description": "Milliseconds to wait before checking post-action state.",
      +        "maximum": 2000,
      +        "minimum": 0,
      +        "type": "integer"
      +      },
      +      "trackFocus": {
      +        "default": true,
      +        "description": "Detect if focus was stolen after the action.",
      +        "type": "boolean"
      +      },
      +      "windowTitle": {
      +        "description": "Partial title of the window that should receive keyboard input.",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "action",
      +      "keys"
      +    ],
      +    "type": "object"
      +  }
      +]
  17. Changed1 schema field changedv1.1.0
    • changedInput schema / oneOf
      Previous value: -[
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "action": {
      -        "const": "type"
      -      },
      -      "fixId": {
      -        "description": "Approve a pending suggestedFix (one-shot, 15s TTL). Pass the fixId returned by a previous failed keyboard(action='type') to re-attempt with guard-validated args.",
      -        "type": "string"
      -      },
      -      "forceFocus": {
      -        "description": "Bypass Windows foreground-stealing protection before focusing.",
      -        "type": "boolean"
      -      },
      -      "forceKeystrokes": {
      -        "default": false,
      -        "description": "When true, always use keystroke mode even if text contains non-ASCII symbols (em-dash, en-dash, smart quotes, etc.) that would normally trigger auto-clipboard. Default false — auto-clipboard is enabled.",
      -        "type": "boolean"
      -      },
      -      "hwnd": {
      -        "description": "Direct window handle ID (takes precedence over windowTitle). Obtain from get_windows response (hwnd field). String type to avoid 64-bit precision issues.",
      -        "type": "string"
      -      },
      -      "lensId": {
      -        "description": "Optional perception lens ID. Guards (safe.keyboardTarget) are evaluated before typing, and a perception envelope is attached to post.perception on success.",
      -        "type": "string"
      -      },
      -      "method": {
      -        "default": "auto",
      -        "description": "Input method. background = WM_CHAR PostMessage (no focus change); foreground = SendInput (current default); auto = pick automatically.",
      -        "enum": [
      -          "auto",
      -          "background",
      -          "foreground"
      -        ],
      -        "type": "string"
      -      },
      -      "narrate": {
      -        "default": "minimal",
      -        "description": "Narration level. rich includes UIA or browser state diff when supported.",
      -        "enum": [
      -          "minimal",
      -          "rich"
      -        ],
      -        "type": "string"
      -      },
      -      "replaceAll": {
      -        "default": false,
      -        "description": "When true, send Ctrl+A to select all existing text before typing. Equivalent to Ctrl+A → keyboard(action='type') in one call (requires field already focused). Default false.",
      -        "type": "boolean"
      -      },
      -      "settleMs": {
      -        "default": 300,
      -        "description": "Milliseconds to wait before checking post-action state.",
      -        "maximum": 2000,
      -        "minimum": 0,
      -        "type": "integer"
      -      },
      -      "text": {
      -        "description": "The text to type (max 10,000 characters)",
      -        "maxLength": 10000,
      -        "type": "string"
      -      },
      -      "trackFocus": {
      -        "default": true,
      -        "description": "Detect if focus was stolen after the action.",
      -        "type": "boolean"
      -      },
      -      "use_clipboard": {
      -        "default": false,
      -        "description": "If true, copy text to clipboard and paste with Ctrl+V instead of simulating keystrokes. Use this when typing URLs, paths, or ASCII text into apps with Japanese IME active — prevents IME from converting characters. Default false.",
      -        "type": "boolean"
      -      },
      -      "windowTitle": {
      -        "description": "Partial title of the window that should receive keyboard input.",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "action",
      -      "text"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "action": {
      -        "const": "press"
      -      },
      -      "forceFocus": {
      -        "description": "Bypass Windows foreground-stealing protection before focusing.",
      -        "type": "boolean"
      -      },
      -      "hwnd": {
      -        "description": "Direct window handle ID (takes precedence over windowTitle). Obtain from get_windows response (hwnd field). String type to avoid 64-bit precision issues.",
      -        "type": "string"
      -      },
      -      "keys": {
      -        "description": "Key combo string, e.g. 'ctrl+c', 'alt+tab', 'enter', 'ctrl+shift+s'. Note: win+r, win+x, win+s, win+l are blocked for security.",
      -        "maxLength": 100,
      -        "type": "string"
      -      },
      -      "lensId": {
      -        "description": "Optional perception lens ID. Guards (safe.keyboardTarget) are evaluated before the key press.",
      -        "type": "string"
      -      },
      -      "method": {
      -        "default": "auto",
      -        "description": "Input method. background = WM_CHAR PostMessage (no focus change); foreground = SendInput (current default); auto = pick automatically.",
      -        "enum": [
      -          "auto",
      -          "background",
      -          "foreground"
      -        ],
      -        "type": "string"
      -      },
      -      "narrate": {
      -        "default": "minimal",
      -        "description": "Narration level. rich includes UIA or browser state diff when supported.",
      -        "enum": [
      -          "minimal",
      -          "rich"
      -        ],
      -        "type": "string"
      -      },
      -      "settleMs": {
      -        "default": 300,
      -        "description": "Milliseconds to wait before checking post-action state.",
      -        "maximum": 2000,
      -        "minimum": 0,
      -        "type": "integer"
      -      },
      -      "trackFocus": {
      -        "default": true,
      -        "description": "Detect if focus was stolen after the action.",
      -        "type": "boolean"
      -      },
      -      "windowTitle": {
      -        "description": "Partial title of the window that should receive keyboard input.",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "action",
      -      "keys"
      -    ],
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "abortOnFocusLoss": {
      +        "description": "Focus Leash Phase B: when true, the foreground keystroke send is split into chunks (default 8 chars; override via DTM_LEASH_CHUNK_SIZE env) and the target window's foreground state is verified between chunks. If the user grabs focus mid-stream, the call aborts and returns FocusLostDuringType with context.typed (chars delivered to target) and context.remaining (unsent tail) so the caller can re-focus and retry the unsent portion. Default: true when windowTitle is provided, false otherwise. Has no effect on the clipboard path (atomic Ctrl+V) or the BG (WM_CHAR) path (HWND-targeted, foreground-independent).",
      +        "type": "boolean"
      +      },
      +      "action": {
      +        "const": "type"
      +      },
      +      "fixId": {
      +        "description": "Approve a pending suggestedFix (one-shot, 15s TTL). Pass the fixId returned by a previous failed keyboard(action='type') to re-attempt with guard-validated args.",
      +        "type": "string"
      +      },
      +      "forceFocus": {
      +        "description": "Bypass Windows foreground-stealing protection before focusing.",
      +        "type": "boolean"
      +      },
      +      "forceKeystrokes": {
      +        "default": false,
      +        "description": "When true, always use keystroke mode even if text contains non-ASCII symbols (em-dash, en-dash, smart quotes, etc.) that would normally trigger auto-clipboard. Default false — auto-clipboard is enabled.",
      +        "type": "boolean"
      +      },
      +      "hwnd": {
      +        "description": "Direct window handle ID (takes precedence over windowTitle). Obtain from get_windows response (hwnd field). String type to avoid 64-bit precision issues.",
      +        "type": "string"
      +      },
      +      "lensId": {
      +        "description": "Optional perception lens ID. Guards (safe.keyboardTarget) are evaluated before typing, and a perception envelope is attached to post.perception on success.",
      +        "type": "string"
      +      },
      +      "method": {
      +        "default": "auto",
      +        "description": "Input method. background = WM_CHAR PostMessage (no focus change); foreground = SendInput (current default); auto = pick automatically.",
      +        "enum": [
      +          "auto",
      +          "background",
      +          "foreground"
      +        ],
      +        "type": "string"
      +      },
      +      "narrate": {
      +        "default": "minimal",
      +        "description": "Narration level. rich includes UIA or browser state diff when supported.",
      +        "enum": [
      +          "minimal",
      +          "rich"
      +        ],
      +        "type": "string"
      +      },
      +      "replaceAll": {
      +        "default": false,
      +        "description": "When true, send Ctrl+A to select all existing text before typing. Equivalent to Ctrl+A → keyboard(action='type') in one call (requires field already focused). Default false.",
      +        "type": "boolean"
      +      },
      +      "settleMs": {
      +        "default": 300,
      +        "description": "Milliseconds to wait before checking post-action state.",
      +        "maximum": 2000,
      +        "minimum": 0,
      +        "type": "integer"
      +      },
      +      "text": {
      +        "description": "The text to type (max 10,000 characters)",
      +        "maxLength": 10000,
      +        "type": "string"
      +      },
      +      "trackFocus": {
      +        "default": true,
      +        "description": "Detect if focus was stolen after the action.",
      +        "type": "boolean"
      +      },
      +      "use_clipboard": {
      +        "default": false,
      +        "description": "If true, copy text to clipboard and paste with Ctrl+V instead of simulating keystrokes. Use this when typing URLs, paths, or ASCII text into apps with Japanese IME active — prevents IME from converting characters. Default false.",
      +        "type": "boolean"
      +      },
      +      "windowTitle": {
      +        "description": "Partial title of the window that should receive keyboard input.",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "action",
      +      "text"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "action": {
      +        "const": "press"
      +      },
      +      "forceFocus": {
      +        "description": "Bypass Windows foreground-stealing protection before focusing.",
      +        "type": "boolean"
      +      },
      +      "hwnd": {
      +        "description": "Direct window handle ID (takes precedence over windowTitle). Obtain from get_windows response (hwnd field). String type to avoid 64-bit precision issues.",
      +        "type": "string"
      +      },
      +      "keys": {
      +        "description": "Key combo string, e.g. 'ctrl+c', 'alt+tab', 'enter', 'ctrl+shift+s'. Note: win+r, win+x, win+s, win+l are blocked for security.",
      +        "maxLength": 100,
      +        "type": "string"
      +      },
      +      "lensId": {
      +        "description": "Optional perception lens ID. Guards (safe.keyboardTarget) are evaluated before the key press.",
      +        "type": "string"
      +      },
      +      "method": {
      +        "default": "auto",
      +        "description": "Input method. background = WM_CHAR PostMessage (no focus change); foreground = SendInput (current default); auto = pick automatically.",
      +        "enum": [
      +          "auto",
      +          "background",
      +          "foreground"
      +        ],
      +        "type": "string"
      +      },
      +      "narrate": {
      +        "default": "minimal",
      +        "description": "Narration level. rich includes UIA or browser state diff when supported.",
      +        "enum": [
      +          "minimal",
      +          "rich"
      +        ],
      +        "type": "string"
      +      },
      +      "settleMs": {
      +        "default": 300,
      +        "description": "Milliseconds to wait before checking post-action state.",
      +        "maximum": 2000,
      +        "minimum": 0,
      +        "type": "integer"
      +      },
      +      "trackFocus": {
      +        "default": true,
      +        "description": "Detect if focus was stolen after the action.",
      +        "type": "boolean"
      +      },
      +      "windowTitle": {
      +        "description": "Partial title of the window that should receive keyboard input.",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "action",
      +      "keys"
      +    ],
      +    "type": "object"
      +  }
      +]
  18. Addedv1.0.3

TDQS

A4.7/5.0
Behavior5/5

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

No annotations exist, so the description carries the entire burden and does so: blocked combos (win+r/x/s/l), IME composition hazards, background vs foreground routing, clipboard replacement and restore, the per-chunk focus leash with FocusLostDuringType plus context.typed/remaining, and a catalogue of typed failure codes (WindowOnOtherDesktop, WindowBlockedByDialog, BackgroundInputNotDelivered, ForegroundRestricted). This is behavior far beyond what any annotation would have supplied.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Well front-loaded and clearly sectioned (Purpose / Details / Prefer / Caveats / Examples), and the examples are genuinely useful. However the Caveats block is an undifferentiated wall of environment variables, error codes, and edge cases, and some content duplicates schema descriptions verbatim (the blocked win+r/x/s/l list appears in both places). It is dense to the point that an agent may skim past the load-bearing destination requirement.

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 19-parameter, no-output-schema, high-risk input-injection tool, the description covers routing, preconditions, safety blocks, verification contracts, and recovery paths, with worked examples for each of the three actions. Almost nothing an agent needs in order to call this correctly is missing.

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 100%, so the baseline is 3; the description earns above that by adding semantics the schema does not spell out in prose — the '@active' sentinel for the foreground window, the titleless-hwnd restriction (works only while already foreground), the DESKTOP_TOUCH_REQUIRE_DESTINATION=0 escape hatch, and the rule that forceKeystrokes:true disables auto-clipboard. The only shortfall is that several of the 19 parameters (settleMs, trackFocus, include, narrate) are left entirely to their schema text.

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?

Opens with a specific verb and resource ('Send keyboard input to a window') and immediately partitions it into three named modes: 'type' for text, 'press' for key combos, 'sequence' for atomic multi-step chords. It also distinguishes itself from sibling approaches by name ('Use desktop_act({action:'setValue'}) for UIA ValuePattern text fields'), so an agent can route correctly 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 Guidelines5/5

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

Explicit selection rules per action ('use for Alt+letter, letter mnemonic chains where intermediate tool calls would close the menu'), plus named alternatives for cases this tool handles badly (use_clipboard=true, forceKeystrokes:true, desktop_act setValue). It also states a hard precondition — windowTitle or hwnd REQUIRED, blank/whitespace counts as neither, otherwise DestinationRequired — which is exactly the when-not guidance an agent needs.

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