Skip to main content
Glama

Send Keys

send_keys

Simulate keyboard input in terminal applications by sending keystrokes, special keys, and shortcuts for automation and testing purposes.

Instructions

Send keystrokes to the TUI app. Use this for special keys and shortcuts, not for typing text (use send_text for that). Accepts a single key descriptor string or an array of key descriptors to send in sequence. Supports named keys (Enter, Tab, Escape, Up, Down, Left, Right, Backspace, Delete, Home, End, PageUp, PageDown, F1-F12, Space) and modifiers (Ctrl+, Alt+, Shift+). Examples: "Enter", "Ctrl+C", ["Down", "Down", "Down", "Enter"], ["Escape", ":wq", "Enter"].

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sessionIdYesSession ID
keysYesKey descriptor or array of key descriptors (e.g. "Enter", "Ctrl+C", ["Down", "Down", "Enter"])
Behavior3/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It describes what the tool does (sends keystrokes) and provides examples of supported keys and modifiers, but doesn't mention error conditions, timing considerations, or what happens if the session doesn't exist. It adds some context but lacks comprehensive behavioral details.

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?

The description is efficiently structured with zero waste: first sentence states purpose and usage guidelines, second explains parameter semantics with examples. Every sentence earns its place and information is front-loaded appropriately.

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 tool with 2 parameters, 100% schema coverage, and no output schema, the description provides good contextual completeness. It explains the tool's purpose, when to use it, and adds valuable parameter semantics. The main gap is lack of behavioral details like error handling or performance characteristics, but overall it's quite complete.

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 100%, so the schema already documents both parameters. The description adds significant value by explaining the semantics of the 'keys' parameter: it clarifies that it accepts a single key descriptor OR an array, provides a comprehensive list of supported named keys and modifiers, and gives concrete examples. This goes well beyond what the schema provides.

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?

The description clearly states the verb ('Send keystrokes') and resource ('to the TUI app'), and explicitly distinguishes it from sibling tool 'send_text' by specifying 'not for typing text (use send_text for that)'. This provides specific differentiation from alternatives.

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?

The description provides explicit guidance on when to use this tool ('for special keys and shortcuts') and when not to use it ('not for typing text'), and names the alternative tool ('use send_text for that'). This gives clear context for selection among sibling tools.

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

Install Server

Other Tools

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/nvms/tui-mcp'

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