Skip to main content
Glama

keyboard

Destructive

Send text or key combinations to a chosen app window, letting AI agents type and trigger shortcuts while preserving the user's focus.

Instructions

Keyboard to an 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) so keystrokes land in the intended app rather than whatever currently holds focus. The window the human is in is focused and typed into on their screen. Any other window gets the keys in the background, with the human's focus left alone: text goes into its text field through the accessibility interface, or key by key through Hyprland's sendshortcut (a character the keyboard layout has no key for is refused on that path). Keys sent that way, and key combos, go to the control the app itself has focused, which is not the field text went into through accessibility: focus a field first with click_ui. Without window, keys go to the focused window. background true or false forces one way. 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. allow_auth=true overrides the default refusal to type into a password field or a system authentication dialog (only when a human intends that credential entry).

Input Schema

NameRequiredDescriptionDefault
keysNo
textNo
thenNonone
actionYes
windowNo
allow_authNo
backgroundNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.13.0
    • addedInput schema / properties / background
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "boolean"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Background"
      +}
  2. Changed1 schema field changedv0.9.4
    • addedInput schema / properties / allow_auth
      Added value: +{
      +  "default": false,
      +  "title": "Allow Auth",
      +  "type": "boolean"
      +}
  3. Changed4 schema fields changedv0.5.0
    • addedInput schema / properties / then
      Added value: +{
      +  "default": "none",
      +  "title": "Then",
      +  "type": "string"
      +}
    • addedInput schema / properties / window
      Added value: +{
      +  "default": "",
      +  "title": "Window",
      +  "type": "string"
      +}
    • addedOutput schema / properties / result / anyOf
      Added value: +[
      +  {
      +    "items": {},
      +    "type": "array"
      +  },
      +  {
      +    "type": "string"
      +  }
      +]
    • removedOutput schema / properties / result / type
      Removed value: -"string"
  4. First observedv0.1.1

TDQS

A4.9/5.0
Behavior5/5

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

Well beyond the annotations (readOnlyHint=false, destructiveHint=true), the description discloses the foreground-vs-background split, that background text goes through the accessibility interface while key-by-key goes through Hyprland sendshortcut (with per-character refusal when no keysym exists), that background focus is separate from the clicked field, and that password/auth dialogs are refused unless allow_auth=true. This is unusually rich behavioral context.

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 action semantics and each sentence carries real information, but it is dense and the middle passage on accessibility vs sendshortcut is a long run-on that could be tightened. No filler, though.

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 7-parameter, high-risk input tool with an output schema present, the description covers targeting, focus semantics, safety refusals, and result chaining (`then`). Output values need not be explained given the output schema. An agent has everything needed to call it correctly and safely.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description carries the full burden — and it does: it defines `action` values, `text` (unicode-safe), `keys` with combo syntax and aliases, `window` (an address from desktop), `background` as a forcing flag, `then` as a result-appending selector, and `allow_auth` as an override. All 7 parameters gain meaning beyond their bare titles.

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 statement of the resource ('Keyboard to an app') and enumerates the action modes ('type', 'key'), so the agent knows exactly what capability this is. It further distinguishes itself from siblings by name: it does NOT trigger Hyprland keybinds (use_bind) or window/workspace actions (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?

Explicit routing rules are given: pass `window` to target a specific app, focus a field with click_ui before sending keys via the accessibility path, use use_bind for Hyprland keybinds and hypr for workspace actions. When-not guidance ('does NOT trigger Hyprland's own keybinds') is spelled out rather than implied.

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