Skip to main content
Glama

ghost_key

Send keystrokes to a window without bringing it to focus, using a title substring or the session anchor for targeting. Supports single keys and editing shortcuts like Ctrl+C.

Instructions

Send a key to a window WITHOUT focusing it. Target = window= (anchored) or the session anchor. Under the default background policy the key is POSTED to the window's focused control: single keys (Enter, Tab, F5, arrows, any character) and the editing shortcuts Ctrl+C/X/V/A/Z (sent as semantic messages). Other modifier combos have no background path and error naming the alternative. For text prefer ghost_act action=type (read-back verified). Hold/release keys='down:Shift' / 'up:Shift' exist only under a foreground policy.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keysYesKey spec: 'Enter', 'a', 'Ctrl+C', 'down:Shift', 'up:Shift'
windowNoTitle substring of the window to send to (anchors it). Omit to use the anchor. With no anchor at all the key goes to the human's foreground window and the response says so.
backgroundNoCompatibility flag: background posting is already the default.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv0.23.4

TDQS

A4.8/5.0
Behavior5/5

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

Despite no annotations, the description discloses the default background posting behavior, the supported key classes including semantic messages for editing shortcuts, the error for unsupported modifier combos, and the fallback when no anchor/window is set. This covers the agent's key decision points for side effects and limitations.

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?

Five dense sentences with zero fluff; the headline behavior is front-loaded, then supported details, then alternatives. Every sentence adds information.

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 key-sending tool with policy modes and anchoring rules, the description covers default behavior, limitations, alternatives, and fallback. It doesn't describe return values or error format, but the output schema is absent and the behavior around errors is at least mentioned ('error naming the alternative').

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?

Input schema already covers all three parameters (100%), so baseline is 3. Description adds meaningful nuance: 'window' anchors by title substring and omitting it falls back to session anchor or human foreground window; 'background' is a compatibility flag since posting is already default. This goes beyond the schema.

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 action ('Send a key to a window') and a critical differentiator ('WITHOUT focusing it'), and clarifies target resolution via 'window=' or session anchor. Names a sibling (ghost_act) as alternative, so it stands apart.

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 recommends ghost_act action=type for text, warns that other modifier combos have no background path and will error naming the alternative, and states hold/release exist only under foreground policy. This gives the agent clear conditions for selecting this tool over alternatives.

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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/NORTHTEKDevs/ghost'

If you have feedback or need assistance with the MCP directory API, please join our Discord server