Skip to main content
Glama

vm_send_key

Send keyboard keys or key combinations to a running QEMU virtual machine's console. Use for VM interaction when a graphical console is not available, with confirmation required.

Instructions

Send a key or key combination to a QEMU VM's console.

The VM must be running. Key names are human-readable and auto-converted to QEMU Monitor key codes. Use vm_screenshot first to see the console state.

Common keys and combos: - 'enter' — Enter key - 'esc' — Escape key - 'tab' — Tab key - 'space' — Space bar - 'backspace' — Backspace - 'up', 'down', 'left', 'right' — Arrow keys - 'f1'-'f12' — Function keys - 'ctrl-alt-delete' — Ctrl+Alt+Del (reboot) - 'ctrl-c' — Ctrl+C - 'win-r' — Win+R (opens Run dialog on Windows) - 'a'-'z', '0'-'9' — Single character keys

Args: vmid: The numeric ID of the QEMU VM. key: Key name or hyphen-separated combo (e.g. 'enter', 'ctrl-alt-delete', 'win-r'). confirm: Must be true to send the key to the VM console.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYes
vmidYes
confirmNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.2.3

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the full disclosure burden and does so well: it reveals that keys are 'human-readable and auto-converted to QEMU Monitor key codes,' that the VM must be running, and that confirm 'must be true' to send. It even flags the destructive implication of 'ctrl-alt-delete' (reboot) in the key list. It stops short of describing error behavior or side effects of arbitrary input, which keeps it from a 5.

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 structure is logical: purpose sentence, preconditions, a key reference list, then argument explanations. Every section earns its place given the 0% schema coverage forces the description to document key syntax. The key list is long, but it functions as an agent-facing cheat sheet; some entries ('enter' — Enter key) are near-tautological yet still useful for disambiguation.

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?

An output schema exists, so return values need no explanation. The description covers the operational essentials: preconditions, key format, the safety confirm gate, and a screenshot-first workflow. The main gaps are explicit differentiation from vm_send_text and clarification of what happens if the VM is not running.

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 fully compensates: `key` gets format semantics ('hyphen-separated combo') plus an extensive list of supported values, and `confirm` gets behavioral meaning ('Must be true to send the key'). The `vmid` entry ('numeric ID of the QEMU VM') adds little beyond the schema type, but the two non-obvious parameters are well documented.

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 opening sentence, 'Send a key or key combination to a QEMU VM's console,' names a specific verb, resource, and target. This clearly differentiates it from siblings like vm_send_text (text input), vm_screenshot (console capture), and start/stop_guest (lifecycle operations). An agent can determine the tool's function without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description states a precondition ('The VM must be running') and gives an explicit workflow hint ('Use vm_screenshot first to see the console state'), which references a sibling tool. It lacks an explicit when-not instruction distinguishing it from vm_send_text, but the context is clear enough for an agent to decide between them.

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