Skip to main content
Glama

Robot Actions — Remote Device Control

Device UHID key press

device_uhid_key_press

Send a key press/release via UHID keyboard (id=2). Uses the device control protocol's boot keyboard interface. On first call, CREATE is sent automatically. modifiers bitmask: bit0=LCtrl, bit1=LShift, bit2=LAlt, bit3=LMeta, bit4=RCtrl, bit5=RShift, bit6=RAlt, bit7=RMeta. keycode is the HID usage ID (0x04=a, 0x28=Enter, 0x29=Escape). Send keycode=0 with modifiers=0 to release. device_key is the higher-level twin: it accepts named keys (HOME, ENTER, ...) instead of raw usage IDs and falls back automatically when a key needs policy-level handling. Prefer device_key for normal automation; reach for this one only when injected key events are filtered.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
udidYesDevice serial number (UDID)
keycodeNoHID usage key code (default 0 = no key)
modifiersNoModifier bitmask (default 0)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior4/5

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

Annotations declare readOnly/destructive/idempotent hints, but the description adds genuinely non-obvious behavior: CREATE is auto-sent on first call (implicit device instantiation) and the release protocol (keycode=0, modifiers=0). It does not mention cleanup/lifecycle pairing with device_uhid_destroy or failure modes, so a small gap remains.

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?

Purpose is front-loaded and the routing advice closes the paragraph, with no filler sentences. The bitmask enumeration is dense but earns its place as the only reference for a bitmask parameter; a compact table would be marginally cleaner.

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 3-param, no-output-schema tool with annotations covering the safety profile, the description supplies the protocol mechanics, parameter encoding, and sibling routing an agent needs to call it correctly. Lifecycle cleanup and error behavior are the only omissions.

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 100%, so baseline would be 3, but the description goes well beyond it: it decodes the modifiers bitmask bit-by-bit, gives example HID usage IDs (0x04=a, 0x28=Enter, 0x29=Escape), and specifies the release convention. That is material meaning the schema does not supply, especially with zero enums defined.

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 verb and resource ('Send a key press/release via UHID keyboard (id=2)') and immediately situates it within the device control protocol's boot keyboard interface. An agent can distinguish it from device_key and device_uhid_input without opening any schema.

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 routes: 'Prefer device_key for normal automation; reach for this one only when injected key events are filtered.' It names the alternative and states both the default case and the narrow exception that selects this tool.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources