Skip to main content
Glama

tool_send_keys

Send keyboard shortcuts to a specific window, including Alt+key menu navigation. Refuses to interrupt when the user is active or when the target window isn't foreground.

Instructions

Send keyboard shortcut to a window. Example: keys=['ctrl','s']. 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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hwndNo
keysNo
titleNo
use_alt_keyNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.1

TDQS

A4.4/5.0
Behavior4/5

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

Annotations are absent, so the description carries the full burden and it delivers: it discloses that the tool is mutating, serialized via admission gate, that global hotkeys yield to the user and refuse with reason user-active, and that it refuses when the target window is not the foreground window. That is rich behavioral disclosure beyond a bare 'send keys' statement. A 5 would require even more, like what exactly happens on failure, but this is substantial.

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

Conciseness5/5

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

Every sentence earns its place: the example, the Alt-navigation tip, the serialization/yield-to-user behavior, and the foreground-window precondition. No filler and information-dense.

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?

Given a 4-parameter tool with no annotations but a present output schema and 18 siblings, the description is complete enough to invoke correctly: window targeting (hwnd/title), shortcut syntax, Alt-key mode, and two refusal conditions are all covered. The output schema exists to explain return values, so that is not a gap.

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 description coverage is 0%, so the description must compensate, and it does for the key parameters: keys get the example ['ctrl','s'], use_alt_key gets the 'alt as first key' guidance, and title/hwnd are the window-targeting pair. It doesn't explain the hwnd=0 default or the title fallback relationship explicitly, but it covers the two non-obvious parameters. Baseline would be 3 at 100% coverage; with 0% coverage and this much guidance, a 4 is appropriate.

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: send keyboard shortcut to a window. Not fully differentiated from sibling tool_type_text, but it names the target and the key-list mechanism clearly, and the title is null so the description carries the load.

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?

Explicitly gives when-to-use guidance: use for shortcuts like ctrl+s, use 'alt' first key for menu navigation. It also gives a when-not-to-use and an alternative: switch to element actions, or retry later, when user is active. This clearly routes the agent compared with siblings like tool_click_at, tool_type_text, and tool_element_action.

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