Skip to main content
Glama

Robot Actions — Remote Device Control

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.8/5.0
Behavior4/5

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

With no annotations, the description carries the behavioral burden. It goes beyond a simple action statement by disclosing automatic CREATE on first call, the boot keyboard interface, the modifier bitmask layout, and the release convention (keycode=0, modifiers=0). It could have also described return values or failure behavior, but what it includes is substantive and relevant.

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 dense but well-organized: purpose first, then protocol detail, then parameter semantics, then sibling differentiation. Every sentence adds operational information; nothing is filler or redundant with the schema.

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 simple three-parameter tool with no output schema and no annotations, the description covers all necessary calling context: how to press, how to release, how to combine modifiers, and when to use this versus the alternative. Nothing critical is missing for an agent to invoke it correctly.

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 already 100%, but the description adds real semantic value: it enumerates each modifier bit's meaning, gives concrete HID usage examples (0x04=a, 0x28=Enter), and explains the release sentinel. This is far more than the schema's generic 'HID usage key code' and 'Modifier bitmask' descriptions.

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 states a specific action ('Send a key press/release') on a specific resource ('UHID keyboard (id=2)') and immediately distinguishes itself from device_key, the higher-level twin. An agent can understand exactly what this tool does and how it differs from siblings.

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 names device_key as the preferred alternative, explains why ('accepts named keys'), and gives the precise condition for choosing this tool instead ('only when injected key events are filtered'). This is model usage guidance.

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