Skip to main content
Glama

keyboard

Send keystrokes or text to a specific window, focusing it first so shortcuts and typed input reach the intended application. Use for automating app-level shortcuts and text entry on Hyprland.

Instructions

Keyboard to the focused app. action='type' (text, unicode-safe) | 'key' (keys combo: 'ctrl+shift+t', 'esc', 'F5'; aliases enter/esc/tab/backspace/pgup/pgdn/arrows, else XKB keysyms). Pass window (an address from desktop) to focus that window first, so keystrokes land in the intended app rather than whatever currently holds focus. This drives shortcuts the focused application handles (ctrl+t, ctrl+l). It does NOT trigger Hyprland's own keybinds (super+...): those go through use_bind, and workspace/window actions through hypr. then ('desktop'|'screenshot'|'ui'|'none') appends the result to this call.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keysNo
textNo
thenNonone
actionYes
windowNo
allow_authNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.11.0

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations, the description carries the behavioral burden. It explains focus targeting, the distinction between app shortcuts and compositor keybinds, the `then` result-appending behavior, and unicode-safety for text. It omits the meaning of `allow_auth`, leaving a minor transparency gap.

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?

The description is dense and information-rich with no filler, front-loading the core action modes before focus and routing guidance. It could be slightly more structured, but every sentence adds necessary value.

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?

For a multi-parameter input tool with no annotations and 0% schema coverage, this covers most invocation essentials: action formats, focus handling, routing exclusions, and `then`. The unexplained `allow_auth` parameter and lack of explicit text/keys pairing instructions prevent a perfect score.

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 `action` values, `keys` formats and aliases, `window` semantics, and `then` options. However, `allow_auth` is not described, and the relationship between `action` and `text`/`keys` is only implicit.

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?

Clearly states it sends keyboard input to the focused app and differentiates the two action modes ('type' vs 'key'). It also explicitly names what it is not for (Hyprland keybinds), distinguishing it from siblings like use_bind and hypr.

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?

Gives explicit when-to-use guidance: application-level shortcuts like ctrl+t and ctrl+l. It also provides clear when-not-to-use instructions, routing Hyprland keybinds to use_bind and workspace/window actions to hypr, plus advice to pass `window` for correct focus.

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