Skip to main content
Glama

tool_send_keys

Send keyboard shortcut to a window. Example: keys=['ctrl','s']. Physical keys follow the active input method. A successful dispatch does not verify that text was committed. Use set_value for literal text when available.

Instructions

Send keyboard shortcut to a window. Example: keys=['ctrl','s']. Physical keys follow the active input method. A successful dispatch does not verify that text was committed. Use set_value for literal text when available. For Alt+key menu navigation, include 'alt' as first key (or set use_alt_key). MUTATING: serialized across agent sessions via the admission gate, and global hotkeys additionally YIELD TO THE USER — recent mouse/keyboard activity makes them wait, then refuse with reason user-active instead of interrupting; switch to element actions or retry later. Also refuses when the window is not the foreground window, because injected keys would go to the wrong window.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "tool_send_keys"
  }
}

Input Schema

NameRequiredDescriptionDefault
hwndNo
keysNo
titleNo
use_alt_keyNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.1

TDQS

A4.5/5.0
Behavior5/5

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

With zero annotations, the description carries the full burden and does it well: it discloses that the operation is MUTATING, serialized across agent sessions via an admission gate, that global hotkeys yield to the user and can refuse with reason 'user-active', and that dispatch success does not confirm text was committed. It also flags the foreground-window precondition and why keys would otherwise go to the wrong window.

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-loaded with the verb and example, then ordered by importance: success caveat, alternative tool, special case, then mutation/refusal behavior. The final sentence is dense and clause-heavy but every clause carries operational meaning.

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?

An output schema exists, so return values need not be described, and the description covers the behavioral risks an agent must plan around (yielding, refusals, foreground requirement). Only the hwnd/title targeting parameters remain unaddressed, which is a minor gap for a tool of this complexity.

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. It explains the keys array format via example and covers use_alt_key explicitly as an alternative to prefixing 'alt'. It leaves hwnd and title unexplained (presumably window targeting), so compensation is partial but substantial.

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?

States a specific verb+resource ("Send keyboard shortcut to a window") with a concrete example (keys=['ctrl','s']) that removes ambiguity about the input shape. It also differentiates itself from literal-text tools by pointing to set_value, so an agent can tell what this tool is and is not.

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?

Gives clear routing rules: use set_value for literal text, include 'alt' as first key (or set use_alt_key) for menu navigation, and fall back to element actions or retry when refused. It stops short of a full when-not matrix (e.g., no mention of type_text by name), so it 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.